/* TravelMe Custom Styles */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Gradient Backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #fd7e14 100%);
}

/* Button Styles */
.btn-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4190);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-gradient:active {
    transform: translateY(0);
}

/* Card Styles */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 15px 15px 0 0 !important;
    border: none;
}

/* Chat Interface Styles */
.chat-container {
    height: 500px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 20px;
    background-color: #f8f9fa;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f1f1;
}

.chat-container::-webkit-scrollbar {
    width: 8px;
}

.chat-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.chat-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.message {
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    animation: fadeInUp 0.3s ease;
}

.message.user {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    margin-left: auto;
    text-align: right;
    border-bottom-right-radius: 4px;
}

.message.ai {
    background-color: white;
    border: 1px solid #dee2e6;
    margin-right: auto;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.message-content {
    margin-bottom: 5px;
}

.message small {
    opacity: 0.7;
    font-size: 0.75em;
}

/* Selection Cards */
.selection-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    background: white;
}

.selection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.selection-card.selected {
    border-color: var(--primary-color);
    background-color: #e3f2fd;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.selection-card i {
    margin-bottom: 8px;
}

/* Trip Info Panel */
.trip-info {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.trip-info h3 {
    margin-bottom: 15px;
    font-weight: 600;
}

.trip-info p {
    margin-bottom: 8px;
    opacity: 0.9;
}

.trip-info i {
    margin-right: 8px;
    width: 16px;
}

/* Suggestions Panel */
.suggestions-container {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f1f1f1;
}

.suggestions-container::-webkit-scrollbar {
    width: 6px;
}

.suggestions-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.suggestions-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.suggestion-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    background-color: white;
    transition: all 0.2s ease;
}

.suggestion-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.suggestion-item h6 {
    color: var(--dark-color);
    margin-bottom: 8px;
    font-weight: 600;
}

.suggestion-item .text-primary {
    color: var(--primary-color) !important;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 15px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 3px #f8f9fa;
}

/* Event Cards */
.event-card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    transition: all 0.3s ease;
    border-radius: 10px;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.event-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.event-type-hotel { background: linear-gradient(135deg, #007bff, #0056b3); }
.event-type-flight { background: linear-gradient(135deg, #28a745, #1e7e34); }
.event-type-car { background: linear-gradient(135deg, #ffc107, #e0a800); color: #000; }
.event-type-restaurant { background: linear-gradient(135deg, #dc3545, #c82333); }
.event-type-activity { background: linear-gradient(135deg, #17a2b8, #138496); }
.event-type-transport { background: linear-gradient(135deg, #6c757d, #545b62); }
.event-type-other { background: linear-gradient(135deg, #6f42c1, #5a32a3); }

/* Notes Section */
.notes-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    border-radius: 0 8px 8px 0;
    margin-top: 15px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.notes-section h6 {
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 600;
}

/* Form Styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
}

.form-label i {
    margin-right: 5px;
}

/* Badge Styles */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

.cost-badge {
    font-size: 0.9em;
    padding: 0.5em 0.75em;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-container {
        height: 400px;
    }
    
    .message {
        max-width: 90%;
    }
    
    .trip-info {
        padding: 20px;
    }
    
    .selection-card {
        padding: 10px;
    }
    
    .timeline {
        padding-left: 20px;
    }
    
    .timeline-item::before {
        left: -12px;
    }
    
    /* Improved card layouts */
    .event-card .card-body {
        padding: 1rem;
    }
    
    .event-card .row {
        gap: 1rem;
    }
    
    /* Better button and text handling */
    .btn-responsive {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Improved timeline */
    .timeline::before {
        left: 10px;
    }
    
    .timeline-item::before {
        left: -17px;
    }
    
    /* Event layout improvements */
    .event-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
        margin: 0 auto 0.5rem;
    }
    
    /* Event info stacking */
    .event-info {
        flex-direction: column;
    }
    
    .event-info > * {
        margin-bottom: 0.5rem;
    }
    
    /* Cost badge positioning */
    .cost-badge {
        margin-top: 0.5rem;
        display: inline-block;
    }
}

@media (max-width: 576px) {
    .chat-container {
        height: 350px;
        padding: 15px;
    }
    
    .message {
        padding: 10px 12px;
        max-width: 95%;
    }
    
    .trip-info {
        padding: 15px;
    }
    
    .trip-info h3 {
        font-size: 1.25rem;
    }
    
    /* Smaller text on mobile */
    .card-title {
        font-size: 1.1rem;
    }
    
    .card-text {
        font-size: 0.9rem;
    }
    
    /* Compact event cards */
    .event-card {
        margin-bottom: 15px;
    }
    
    .event-card .card-body {
        padding: 0.75rem;
    }
    
    /* Stack event metadata */
    .event-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .event-meta > * {
        width: 100%;
    }
    
    /* Adjust icon sizes */
    .fa-2x {
        font-size: 1.5em;
    }
    
    .fa-3x {
        font-size: 2em;
    }
    
    /* Container padding */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Better spacing for stacked items */
    .stack-on-mobile {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .stack-on-mobile > * {
        width: 100%;
    }
}

/* Responsive Navigation Improvements */
@media (max-width: 992px) {
    .navbar-nav {
        padding: 0.5rem 0;
    }
    
    .navbar-nav .nav-item {
        padding: 0.25rem 0;
    }
    
    .dropdown-menu {
        border: none;
        background: transparent;
        padding: 0;
    }
    
    .dropdown-item {
        color: rgba(255,255,255,0.8);
        padding: 0.5rem 1rem;
    }
    
    .dropdown-item:hover {
        background: rgba(255,255,255,0.1);
        color: white;
    }
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.shadow-medium {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.shadow-strong {
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .chat-container,
    .suggestions-panel {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .trip-info {
        background: white !important;
        color: black !important;
        border: 1px solid #000;
    }
}
