/* -------------------------------------------------------------
   DOLCE FAR NIENTE - DESIGN SYSTEM & STYLES
   ------------------------------------------------------------- */

/* Variables & Token definitions */
:root {
    --bg-base: #0a0c16;
    --bg-grid: rgba(99, 102, 241, 0.04);
    
    /* Elegant Color Palette */
    --color-primary-start: #6366f1; /* Indigo */
    --color-primary-end: #a855f7;   /* Purple */
    --color-accent: #38bdf8;        /* Sky Blue */
    --color-error: #f43f5e;         /* Rose */
    --color-success: #10b981;       /* Emerald */
    
    /* Text colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    /* Glassmorphism settings */
    --glass-bg: rgba(30, 41, 59, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: rgba(0, 0, 0, 0.35);
    --glass-glow: rgba(99, 102, 241, 0.15);
    
    /* Borders & Spacing */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Base resets & Layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-x: hidden;
    position: relative;
}

/* Background mesh glow effects */
body::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.05) 50%, transparent 100%);
    top: -100px;
    left: -100px;
    z-index: -1;
    pointer-events: none;
    filter: blur(40px);
}

body::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, rgba(99, 102, 241, 0.02) 60%, transparent 100%);
    bottom: -100px;
    right: -100px;
    z-index: -1;
    pointer-events: none;
    filter: blur(40px);
}

/* Environment Banner */
.env-banner {
    width: 100%;
    background: linear-gradient(90deg, #b91c1c, #991b1b);
    color: #ffffff;
    text-align: center;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 10;
    animation: slideDown 0.4s ease-out;
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 900px;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

/* Header Design */
.app-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
}

.logo-container {
    position: relative;
    width: 130px;
    height: 130px;
}

.app-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.25));
    animation: breathe 5s ease-in-out infinite;
}

.app-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.05rem;
    background: linear-gradient(135deg, #ffffff 30%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.app-subtitle {
    font-family: 'Outfit', sans-serif;
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 300;
    letter-spacing: 0.15rem;
    text-transform: uppercase;
    opacity: 0.75;
}

/* Main Grid Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    width: 100%;
}

@media (min-width: 768px) {
    .main-content {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

/* Cards (Glassmorphism) */
.card {
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: 0 15px 35px var(--glass-shadow);
    transition: var(--transition-bounce);
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    overflow: hidden;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary-start), var(--color-primary-end));
    opacity: 0.8;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4), 0 0 30px var(--glass-glow);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Section Headings */
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.65rem;
    font-weight: 600;
    color: var(--text-primary);
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 300;
}

/* Input Fields & Styling */
.date-range-inputs {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}

.date-separator {
    align-self: center;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05rem;
    margin: 4px 0;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    color: var(--text-secondary);
    padding-left: 4px;
}

.input-wrapper {
    position: relative;
    width: 100%;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
}

.input-wrapper:hover {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(15, 23, 42, 0.8);
}

.input-wrapper:focus-within {
    border-color: var(--color-primary-start);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25);
    background: #0f172a;
}

/* Styled Inputs */
input[type="date"], select, textarea {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    padding: 14px 16px;
}

/* Customizing Date inputs for a clean dark look */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) sepia(1) saturate(5) hue-rotate(200deg);
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition-smooth);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Select wrapper styling (dropdown arrow) */
.select-wrapper::after {
    content: '▼';
    font-size: 0.7rem;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-smooth);
}

.select-wrapper:focus-within::after {
    color: var(--color-primary-start);
}

select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 40px; /* space for arrow */
}

select option {
    background: #0f172a;
    color: var(--text-primary);
    padding: 10px;
}

/* Trip Preparations (Steps) */
.actions-section {
    animation: fadeIn 0.5s ease-out;
}

.prep-step {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 24px;
}

.prep-step:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.step-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary-start), var(--color-primary-end));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.4);
}

.step-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.step-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.step-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.4;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary-start), var(--color-primary-end));
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.5), 0 0 15px rgba(168, 85, 247, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: #ffffff;
    color: #0a0c16;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover:not(:disabled) {
    border-color: #ffffff;
    color: #ffffff;
    transform: translateY(-1px);
}

.btn:disabled, .btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.email-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Email text area styling */
.textarea-wrapper {
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-smooth);
    width: 100%;
}

textarea {
    resize: none;
    line-height: 1.6;
    font-size: 0.95rem;
    font-weight: 300;
}

textarea:focus {
    /* override since it is read-only */
    box-shadow: none;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.toast {
    background: rgba(15, 23, 42, 0.9);
    border-left: 4px solid var(--color-primary-start);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    border-right: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 280px;
    animation: slideIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
}

.toast.toast-error {
    border-left-color: var(--color-error);
}

.toast.toast-success {
    border-left-color: var(--color-success);
}

/* Loading Spinners */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

/* Helper Utilities */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes breathe {
    0%, 100% {
        transform: scale(1) translateY(0);
        filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.2));
    }
    50% {
        transform: scale(1.04) translateY(-3px);
        filter: drop-shadow(0 0 35px rgba(168, 85, 247, 0.4));
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
