/* ==========================================================================
   Trippo Travel Planner - Main & Base Styles
   Variables, Typography, Global Resets, Views, Dark Mode, Print
   ========================================================================== */

:root {
    --primary: #0f5132;
    --primary-light: #e8f5e9;
    --accent: #ff4757;
    --accent-hover: #ff6b81;
    --bg: #f8fafc;
    --text: #1e293b;
    --card-bg: #ffffff;
    --border-subtle: #e2e8f0;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0f5132 0%, #198754 100%);
    --gradient-accent: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);
}

body.dark-mode {
    --primary: #20c997;
    --primary-light: #064e3b;
    --accent: #ff6b81;
    --accent-hover: #ff4757;
    --bg: #0f172a;
    --text: #f8fafc;
    --card-bg: #1e293b;
    --border-subtle: #334155;
    
    /* Dark Mode Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    height: 100dvh;
    width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6, .header-title {
    font-family: 'Outfit', -apple-system, sans-serif;
    letter-spacing: -0.02em;
}

.flatpickr-calendar {
    z-index: 99999 !important;
}

/* Base View Panel Transitions */
.view {
    display: none;
    height: 100%;
    width: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
}

.view.active {
    display: flex;
    flex-direction: column;
}

#home-view.active,
#bookings-view.active,
#transit-view.active {
    display: block;
}

#planner-view.active {
    overflow: hidden;
    padding-bottom: 0;
    height: 100%;
}

#places-view.active {
    height: 100%;
}

#places-view.has-city-open {
    overflow: hidden;
    padding-bottom: 0;
}

#wishlist-view.active {
    height: 100%;
}

#wishlist-view.has-detail-open {
    overflow: hidden;
    padding-bottom: 0;
}

.header-title {
    padding: calc(18px + env(safe-area-inset-top, 0px)) 20px 12px 20px;
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Print Styles for PDF / Paper Export */
@media print {
    .bottom-nav,
    .fab,
    .map-controls-row,
    #sidebar-drawer,
    .sidebar-backdrop,
    button,
    select {
        display: none !important;
    }
    body, html, .view {
        overflow: visible !important;
        height: auto !important;
        background: white !important;
        color: black !important;
        padding: 0 !important;
    }
    .sheet {
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        color: black !important;
    }
    .stop-card,
    .trip-card,
    .place-item-card {
        border: 1px solid #ccc !important;
        break-inside: avoid;
        background: white !important;
        color: black !important;
    }
    .map-container {
        display: none !important;
    }
}

body.hotline-mode {
    --primary: #ff00ff;
    --primary-light: #2d0036;
    --accent: #00ffff;
    --accent-hover: #ff007f;
    --bg: #1a0024;
    --text: #00ffff;
    --card-bg: #2d004d;
    --border-subtle: #ff00ff;
    
    /* Hotline Mode Shadows */
    --shadow-sm: 0 1px 3px rgba(255, 0, 255, 0.3);
    --shadow-md: 0 4px 12px rgba(255, 0, 255, 0.4);
    --shadow-lg: 0 12px 24px rgba(0, 255, 255, 0.5);
    
    /* Hotline Mode Gradients */
    --gradient-primary: linear-gradient(135deg, #ff00ff 0%, #00ffff 100%);
    --gradient-accent: linear-gradient(135deg, #00ffff 0%, #ff007f 100%);
}
