/* ========================================
   AI Summer Trip Planner - Styles
   ======================================== */

:root {
    --primary: #1b2d4f;
    --primary-dark: #101e36;
    --secondary: #f2720c;
    --accent: #f2720c;
    --bg: #fafbfd;
    --surface: #ffffff;
    --text: #1c2433;
    --text-light: #546178;
    --border: #dde3ec;
    --error: #dc3545;
    --success: #0fb882;
    --radius: 10px;
    --shadow: 0 2px 8px rgba(27, 45, 79, 0.07), 0 1px 3px rgba(27, 45, 79, 0.05);
    --shadow-lg: 0 12px 28px rgba(27, 45, 79, 0.1), 0 4px 10px rgba(27, 45, 79, 0.06);
    --gradient-hero: linear-gradient(140deg, #1b2d4f 0%, #2a4270 40%, #3d3d3d 100%);
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Dark Theme */
[data-theme="dark"] {
    --primary: #6ba3d6;
    --primary-dark: #1b2d4f;
    --secondary: #f5893a;
    --accent: #f5893a;
    --bg: #111820;
    --surface: #1a2332;
    --text: #e8ecf2;
    --text-light: #8d9bb0;
    --border: #2a3648;
    --error: #f77;
    --success: #3de8a8;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.45), 0 4px 8px rgba(0, 0, 0, 0.3);
    --gradient-hero: linear-gradient(140deg, #0e1620 0%, #1b2d4f 50%, #111820 100%);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    background: var(--gradient-hero);
    color: white;
    text-align: center;
    padding: 3.5rem 1rem 3rem;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--secondary);
}

.hero::before {
    content: '✈️ 🏖️ 🗺️ 🌄 🏔️';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    opacity: 0.2;
    letter-spacing: 1rem;
}

.hero-content h1 {
    font-size: 2.2rem;
    margin-bottom: 0.3rem;
    font-weight: 800;
}

.hero-content .byline {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.9;
    display: block;
    margin-top: 0.2rem;
}

.hero-content .developed-with {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.hero-content .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.hero-qr {
    position: absolute;
    top: 4.5rem;
    right: 1rem;
}

.qr-image {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    opacity: 0.9;
    transition: opacity 0.3s, transform 0.3s;
}

.qr-image:hover {
    opacity: 1;
    transform: scale(1.1);
}

.theme-toggle button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s;
}

.theme-toggle button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   Container
   ======================================== */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ========================================
   Form Section
   ======================================== */
.form-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.form-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.required {
    color: var(--error);
}

input[type="text"],
input[type="number"],
input[type="email"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font);
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(242, 114, 12, 0.1);
}

textarea {
    resize: vertical;
}

.error-msg {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

/* ========================================
   Radio & Checkbox Groups
   ======================================== */
.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 400;
    font-size: 0.9rem;
    transition: all 0.2s;
    user-select: none;
}

.radio-label:hover,
.checkbox-label:hover {
    border-color: var(--secondary);
    background: rgba(242, 114, 12, 0.04);
}

.radio-label input:checked + *,
.checkbox-label input:checked + * {
    color: var(--secondary);
}

.radio-label:has(input:checked),
.checkbox-label:has(input:checked) {
    border-color: var(--secondary);
    background: rgba(242, 114, 12, 0.06);
    box-shadow: 0 0 0 1px rgba(242, 114, 12, 0.12);
}

input[type="radio"],
input[type="checkbox"] {
    accent-color: var(--secondary);
    width: 16px;
    height: 16px;
}

/* ========================================
   Buttons
   ======================================== */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--secondary);
    color: white;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.btn-primary:hover:not(:disabled) {
    background: #d8620a;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(242, 114, 12, 0.28);
}

.btn-secondary {
    background: var(--primary);
    color: white;
    font-weight: 700;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(27, 45, 79, 0.22);
}

.btn-outline {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--text-light);
    color: var(--text);
}

/* ========================================
   Loading
   ======================================== */
.loading-section {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Banners
   ======================================== */
.banner {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.banner-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.banner-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

[data-theme="dark"] .banner-error {
    background: #451a1a;
    color: #fca5a5;
    border-color: #7f1d1d;
}

[data-theme="dark"] .banner-success {
    background: #14532d;
    color: #86efac;
    border-color: #166534;
}

.banner-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.banner-close:hover {
    opacity: 1;
}

/* ========================================
   Results Section
   ======================================== */
.results-section {
    margin-top: 2rem;
}

/* Trip Header */
.trip-header {
    background: var(--gradient-hero);
    color: white;
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
    text-align: center;
}

.trip-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.trip-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    opacity: 0.9;
}

.trip-overview {
    margin-top: 1rem;
    font-size: 1rem;
    line-height: 1.7;
    opacity: 0.95;
}

/* Day Cards */
.day-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--secondary);
}

.day-card h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.day-activity {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg);
    border-radius: 8px;
}

.day-activity .time-label {
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.25rem;
}

.day-activity .activity-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.day-activity .activity-details {
    color: var(--text-light);
    font-size: 0.9rem;
}

.dietary-note {
    color: var(--success);
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 0.25rem;
}

.option-item {
    margin-bottom: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: rgba(27, 45, 79, 0.03);
    border-left: 3px solid var(--primary);
    border-radius: 4px;
}

[data-theme="dark"] .option-item {
    background: rgba(107, 163, 214, 0.06);
}

.option-item:last-child {
    margin-bottom: 0;
}

.option-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.travel-notes {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(242, 114, 12, 0.04);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
    border-left: 3px solid var(--secondary);
}

/* Section Cards */
.section-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.section-card h3 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary);
    font-weight: 700;
}

/* Food Recommendations */
.food-item {
    padding: 0.75rem;
    background: var(--bg);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.food-item .cuisine-type {
    font-weight: 700;
    color: var(--accent);
}

.food-item .suggestion {
    margin-top: 0.25rem;
}

.food-item .area {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Packing List */
.packing-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.packing-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
}

.packing-item input[type="checkbox"] {
    flex-shrink: 0;
}

/* Budget Table */
.budget-table {
    width: 100%;
    border-collapse: collapse;
}

.budget-table tr {
    border-bottom: 1px solid var(--border);
}

.budget-table td {
    padding: 0.75rem 0.5rem;
}

.budget-table td:last-child {
    text-align: right;
    font-weight: 600;
}

.budget-table tr:last-child {
    border-bottom: none;
    font-size: 1.1rem;
}

.budget-table tr:last-child td {
    color: var(--primary);
    font-weight: 700;
    padding-top: 1rem;
}

.budget-disclaimer {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #92400e;
}

[data-theme="dark"] .budget-disclaimer {
    background: #451a03;
    border-color: #78350f;
    color: #fbbf24;
}

/* Travel Tips */
.tips-list {
    list-style: none;
}

.tips-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.tips-list li::before {
    content: '💡';
    position: absolute;
    left: 0;
}

/* Disclaimer */
.disclaimer-card {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #9a3412;
}

[data-theme="dark"] .disclaimer-card {
    background: #431407;
    border-color: #7c2d12;
    color: #fdba74;
}

/* ========================================
   Footer
   ======================================== */
footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
    margin-top: 3rem;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 1.6rem;
    }

    .hero::before {
        font-size: 1.5rem;
    }

    .hero-qr {
        top: 3rem;
        right: 0.75rem;
    }

    .qr-image {
        width: 70px;
        height: 70px;
    }

    .theme-toggle {
        top: 0.75rem;
        right: 0.75rem;
    }

    .container {
        padding: 1rem;
    }

    .form-section {
        padding: 1.5rem;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .trip-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .packing-list {
        grid-template-columns: 1fr;
    }

    .radio-group,
    .checkbox-group {
        gap: 0.5rem;
    }

    .radio-label,
    .checkbox-label {
        font-size: 0.85rem;
        padding: 0.4rem 0.75rem;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .hero,
    .form-section,
    .button-group,
    .theme-toggle,
    .banner,
    .loading-section,
    footer {
        display: none !important;
    }

    .results-section {
        display: block !important;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .day-card,
    .section-card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }

    .trip-header {
        background: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
