/* Travel & Holiday Planner Styles */

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}

/* Modal Base Styles */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex !important;
}

.modal-content {
    background: var(--card-bg, #1e293b);
    color: var(--text-primary, #f1f5f9);
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
    color: var(--text-primary, #f1f5f9);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2em;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #f1f5f9);
}

.modal-body {
    padding: 30px;
}

.modal-body * {
    color: var(--text-primary, #f1f5f9);
}

.modal-body .form-control option {
    background: var(--card-bg, #1e293b);
    color: var(--text-primary, #f1f5f9);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 30px;
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.modal-actions {
    margin-bottom: 20px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2em;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    color: var(--text-muted);
}

/* Tabs */
.tabs-container {
    margin-bottom: 30px;
}

.tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
}

.tab {
    background: none;
    border: none;
    padding: 12px 24px;
    font-size: 1em;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.tab:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.tab i {
    margin-right: 8px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

/* Trips Grid */
.trips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

/* Trip Card */
.trip-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.trip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.trip-card-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trip-destination {
    font-size: 0.9em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trip-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.trip-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.trip-name {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.trip-dates {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 8px;
}

.trip-date-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.trip-date-item i {
    color: var(--primary-color);
}

.trip-date-separator {
    color: var(--text-muted);
    font-weight: 600;
}

.trip-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.trip-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    color: var(--text-muted);
}

.trip-meta-item i {
    color: var(--primary-color);
}

.trip-budget {
    margin-top: auto;
}

.budget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.85em;
}

.budget-label {
    color: var(--text-muted);
    font-weight: 600;
}

.budget-amount {
    color: var(--text-secondary);
    font-weight: 600;
}

.budget-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.budget-progress {
    height: 100%;
    transition: width 0.3s;
    border-radius: 10px;
}

.trip-notes {
    font-size: 0.85em;
    color: var(--text-muted);
    padding: 10px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 6px;
    display: flex;
    gap: 8px;
}

.trip-notes i {
    color: var(--primary-color);
    margin-top: 2px;
}

.trip-card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.02);
}

.trip-creator {
    font-size: 0.8em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.trip-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1em;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4em;
    color: var(--border-color);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5em;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 1em;
    margin-bottom: 20px;
}

/* Modal Size Variants */
.modal-large {
    max-width: 700px !important;
}

/* Modal Form Styles */
.modal .form-group {
    margin-bottom: 20px;
}

.modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary, #f1f5f9);
    font-size: 0.95em;
}

.modal .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.2));
    border-radius: 8px;
    font-size: 1em;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary, #f1f5f9) !important;
    transition: all 0.2s;
}

.modal .form-control::placeholder {
    color: var(--text-muted, #94a3b8);
    opacity: 0.7;
}

.modal .form-control:focus {
    outline: none;
    border-color: var(--primary-color, #6366f1);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.modal textarea.form-control {
    resize: vertical;
    font-family: inherit;
}

.modal select.form-control {
    cursor: pointer;
    color: var(--text-primary, #f1f5f9) !important;
}

.modal select.form-control option {
    background: var(--card-bg, #1e293b);
    color: var(--text-primary, #f1f5f9);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    transition: background 0.2s;
    color: var(--text-primary, #f1f5f9) !important;
}

.checkbox-label:hover {
    background: rgba(99, 102, 241, 0.2);
}

.checkbox-label span {
    color: var(--text-primary, #f1f5f9) !important;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color, #6366f1);
}

/* Passports List */
.passports-list {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.passport-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    cursor: pointer;
}

.passport-card:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.passport-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.passport-flag {
    font-size: 2.5em;
}

.passport-details h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1.1em;
    font-weight: 600;
}

.passport-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85em;
    color: var(--text-muted);
}

.passport-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.passport-meta i {
    color: var(--primary-color);
}

.passport-expiry {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
}

.passport-expiry.valid {
    background: rgba(16, 185, 129, 0.2);
    color: #6EE7B7;
    border: 1px solid rgba(110, 231, 183, 0.3);
}

.passport-expiry.expiring-soon {
    background: rgba(251, 191, 36, 0.2);
    color: #FCD34D;
    border: 1px solid rgba(252, 211, 77, 0.3);
}

.passport-expiry.expired {
    background: rgba(239, 68, 68, 0.2);
    color: #FCA5A5;
    border: 1px solid rgba(252, 165, 165, 0.3);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.alert a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .trips-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        justify-content: flex-start;
    }

    .tab {
        font-size: 0.9em;
        padding: 10px 16px;
    }
}

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