/* ============================================================
   Mooie Route - Stylesheet
   Apple Maps-inspired liquid design
   ============================================================ */

/* CSS Variables - Apple Design Language */
:root {
    /* iOS Colors */
    --ios-blue: #007AFF;
    --ios-green: #34C759;
    --ios-orange: #FF9500;
    --ios-red: #FF3B30;
    --ios-yellow: #FFCC00;
    --ios-purple: #AF52DE;

    /* Background Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F5F5F7;
    --bg-tertiary: #E5E5EA;
    --bg-glass: rgba(255, 255, 255, 0.85);

    /* Text Colors */
    --text-primary: #1C1C1E;
    --text-secondary: #8E8E93;
    --text-tertiary: #C7C7CC;

    /* Route Colors */
    --route-scenic: #007AFF;
    --route-fastest: #34C759;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* App Container */
.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
    background: linear-gradient(to bottom right, #E3F2FD, #BBDEFB);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #90CAF9;
    z-index: 100;
    max-height: 125px;
    overflow: hidden;
}

.header-logo {
    display: block;
    height: auto;
    max-height: 150px;
    width: auto;
    padding: 0;
    margin: 0;
    flex: 1;
}

.header-logo img {
    display: block;
    height: auto;
    max-height: 125px;
    width: auto;
}

.btn-info {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-right: 10px;
    color: #1565C0;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.btn-info:hover {
    background-color: rgba(21, 101, 192, 0.1);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 380px;
    background: var(--bg-primary);
    border-right: 1px solid var(--bg-tertiary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10;
}

/* Input Section */
.input-section {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--bg-tertiary);
}

.input-section h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

/* Section Header with Collapse */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-bottom: var(--spacing-md);
}

.section-header h2 {
    margin-bottom: 0;
}

.btn-collapse {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-collapse:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-collapse svg {
    transition: transform 0.3s ease;
}

.input-section.collapsed .btn-collapse svg {
    transform: rotate(180deg);
}

.input-section.collapsed .input-section-content {
    display: none;
}

/* Form Groups */
.form-group {
    margin-bottom: var(--spacing-md);
    position: relative;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.form-group label svg {
    opacity: 0.7;
}

.form-input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    padding-right: 44px;
    border: 1px solid var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--bg-secondary);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--ios-blue);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

/* Current Location Button */
.btn-current-location {
    position: absolute;
    right: 8px;
    top: 70%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: var(--ios-blue);
    border-radius: var(--radius-sm);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-current-location:hover {
    background: #0066CC;
    transform: translateY(-50%) scale(1.05);
}

/* Slider */
.slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-tertiary);
    border-radius: 2px;
    outline: none;
    margin: var(--spacing-sm) 0;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--ios-blue);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Checkbox Group - Snelwegen vermijden */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: var(--spacing-md);
}

.checkbox-group:hover {
    background: var(--bg-tertiary);
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--ios-blue);
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    margin-bottom: 0;
}

/* POI Toggles */
.poi-toggles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xs);
}

.poi-toggle {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.poi-toggle:has(input:checked) {
    background: rgba(0, 122, 255, 0.1);
}

.poi-toggle input {
    display: none;
}

.toggle-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.poi-toggle:has(input:checked) .toggle-label {
    color: var(--ios-blue);
    font-weight: 500;
}

/* Calculate Button */
.btn-calculate {
    width: 100%;
    padding: var(--spacing-md);
    background: linear-gradient(135deg, var(--ios-blue) 0%, #5856D6 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-calculate:active {
    transform: translateY(0);
}

.btn-calculate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================================
   RESULTS SECTION
   ============================================================ */
.results-section {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
    padding-bottom: var(--spacing-xl);
}

/* Route Toggle */
.route-toggle {
    display: flex;
    gap: var(--spacing-xs);
    background: var(--bg-secondary);
    padding: var(--spacing-xs);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.toggle-btn {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn.active {
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* Route Info */
.route-info {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.route-duration {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-xs);
}

.duration-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ios-blue);
    letter-spacing: -1px;
}

.duration-unit {
    font-size: 1rem;
    color: var(--text-secondary);
}

.time-diff {
    font-size: 1.5rem;
    color: var(--ios-orange);
    font-weight: 600;
    margin-left: 4px;
}

/* Button Container for action buttons */
.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-sm);
    gap: var(--spacing-sm);
}

/* Info Button - Icon only */
.btn-info {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-info:hover {
    background: var(--bg-secondary);
    border-color: var(--ios-blue);
    color: var(--ios-blue);
}

/* Google Maps Link - styled as text link */
.btn-google-maps {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0;
    background: transparent;
    border: none;
    color: var(--ios-blue);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-google-maps:hover {
    text-decoration: underline;
    color: #0066CC;
}

.btn-google-maps svg {
    flex-shrink: 0;
}

.route-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* POI List */
.poi-list h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.poi-items {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.poi-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    padding-left: 80px;
    /* Make room for the number circle and reorder buttons */
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 1px solid var(--bg-tertiary);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.poi-item:hover {
    border-color: var(--ios-blue);
    box-shadow: var(--shadow-sm);
}

.poi-item.selected {
    border-color: var(--ios-blue);
    background: rgba(0, 122, 255, 0.05);
}

/* POI Number Circle - Orange ball in top-left corner */
.poi-number {
    position: absolute;
    top: 2px;
    left: 1px;
    width: 24px;
    height: 24px;
    background: var(--ios-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
    z-index: 1;
}

/* POI Delete Button */
.poi-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--bg-secondary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 2;
}

.poi-item:hover .poi-delete {
    opacity: 1;
}

.poi-delete:hover {
    background: var(--ios-red);
    color: white;
}

.poi-delete svg {
    width: 14px;
    height: 14px;
}

/* POI Reorder Buttons - Up/Down Arrows */
.poi-reorder {
    position: absolute;
    top: 50%;
    left: 30px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
}

.poi-item:hover .poi-reorder {
    opacity: 1;
}

.poi-move-up,
.poi-move-down {
    width: 18px;
    height: 18px;
    background: var(--bg-secondary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.poi-move-up:hover:not(:disabled),
.poi-move-down:hover:not(:disabled) {
    background: var(--ios-blue);
    color: white;
}

.poi-move-up:disabled,
.poi-move-down:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.poi-move-up svg,
.poi-move-down svg {
    width: 12px;
    height: 12px;
}

.poi-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.poi-icon:empty {
    display: none;
}

.poi-details {
    flex: 1;
    min-width: 0;
    margin-left: -15px;
}

.poi-name {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.poi-type {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.poi-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 0.8rem;
    color: var(--ios-orange);
}

/* ============================================================
   MAP CONTAINER
   ============================================================ */
.map-container {
    flex: 1;
    position: relative;
}

.map {
    width: 100%;
    height: 100%;
}

/* Google Maps Custom Styles */
.map-container .gm-style {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
}

/* ============================================================
   LOADING OVERLAY
   ============================================================ */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--ios-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-md);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
    position: fixed;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.toast {
    background: var(--text-primary);
    color: white;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toast-in 0.3s ease;
}

.toast.success {
    background: var(--ios-green);
}

.toast.error {
    background: var(--ios-red);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   MODAL DIALOG
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 300;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    padding-right: var(--spacing-xl);
}

.modal-body {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

.modal-body h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ios-blue);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-xs);
}

.modal-body h4:first-child {
    margin-top: 0;
}

.modal-body .waypoint-item {
    padding: var(--spacing-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
}

.modal-body .waypoint-number {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: var(--ios-orange);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: var(--spacing-xs);
}

/* ============================================================
   MOBILE RESPONSIVE - Full Mobile Experience
   Bottom Sheet, Full-Screen Map, Floating Buttons
   ============================================================ */
@media (max-width: 768px) {

    /* Hide traditional desktop header elements */
    .app-header {
        padding: var(--spacing-sm) var(--spacing-md);
        max-height: 60px;
        min-height: 60px;
    }

    .header-logo {
        max-height: 40px;
    }

    .header-logo img {
        max-height: 40px;
    }

    /* Full-screen map by default on mobile */
    .map-container {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
    }

    /* Mobile sidebar - Bottom Sheet Style */
    .sidebar {
        position: fixed;
        left: 0;
        right: 0;
        top: auto;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: 85vh;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        transform: translateY(calc(100% - 60px));
        transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
        z-index: 50;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        display: flex;
        flex-direction: column;
    }

    .sidebar.open {
        transform: translateY(0);
    }

    /* Bottom sheet drag handle */
    .sidebar::before {
        content: '';
        display: block;
        width: 40px;
        height: 5px;
        background: var(--bg-tertiary);
        border-radius: 3px;
        margin: var(--spacing-sm) auto;
        flex-shrink: 0;
    }

    /* Mobile menu toggle button */
    .sidebar-toggle {
        display: flex;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 60;
        background: var(--ios-blue);
        color: white;
        border: none;
        border-radius: 50px;
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 1rem;
        font-weight: 600;
        box-shadow: var(--shadow-lg);
        cursor: pointer;
        align-items: center;
        gap: var(--spacing-sm);
        transition: all 0.3s ease;
    }

    .sidebar-toggle:hover {
        transform: translateX(-50%) scale(1.05);
    }

    .sidebar-toggle svg {
        width: 20px;
        height: 20px;
    }

    /* Hide toggle when sidebar is open */
    .sidebar.open+.sidebar-toggle,
    .sidebar.open~.sidebar-toggle {
        display: none;
    }

    /* Input section on mobile */
    .input-section {
        padding: var(--spacing-md);
        border-bottom: none;
    }

    .input-section-content {
        padding-bottom: var(--spacing-md);
    }

    .section-header h2 {
        font-size: 1.1rem;
    }

    /* Larger touch-friendly inputs */
    .form-input {
        padding: 14px var(--spacing-md);
        padding-right: 50px;
        font-size: 1.1rem;
        min-height: 48px;
    }

    .btn-current-location {
        width: 40px;
        height: 40px;
        top: 65%;
    }

    /* Larger calculate button */
    .btn-calculate {
        padding: 16px var(--spacing-lg);
        font-size: 1.1rem;
        min-height: 52px;
    }

    /* Results section */
    .results-section {
        padding: var(--spacing-md);
        padding-bottom: var(--spacing-xl);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Larger route toggle for touch */
    .route-toggle {
        padding: var(--spacing-sm);
    }

    .toggle-btn {
        padding: 12px var(--spacing-md);
        font-size: 1rem;
        min-height: 44px;
    }

    /* Route info - larger text */
    .route-info {
        padding: var(--spacing-lg);
    }

    .duration-value {
        font-size: 2.5rem;
    }

    .route-stats {
        font-size: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* POI items - larger touch targets */
    .poi-item {
        padding: var(--spacing-md);
        padding-left: 80px;
        min-height: 72px;
    }

    .poi-number {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .poi-reorder {
        left: 28px;
    }

    .poi-icon {
        width: 48px;
        height: 48px;
    }

    .poi-name {
        font-size: 1.05rem;
    }

    .poi-delete {
        opacity: 1;
        width: 32px;
        height: 32px;
    }

    .poi-reorder {
        opacity: 1;
    }

    .poi-move-up,
    .poi-move-down {
        width: 28px;
        height: 28px;
    }

    /* Floating Action Button for route toggle */
    .fab-container {
        position: fixed;
        top: 70px;
        right: var(--spacing-md);
        z-index: 40;
        display: flex;
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .fab {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: var(--shadow-lg);
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .fab:active {
        transform: scale(0.95);
    }

    .fab-primary {
        background: var(--ios-blue);
        color: white;
    }

    .fab-secondary {
        background: white;
        color: var(--text-primary);
    }

    .fab svg {
        width: 24px;
        height: 24px;
    }

    /* My location FAB */
    .fab-my-location {
        position: fixed;
        bottom: 100px;
        right: var(--spacing-md);
        z-index: 40;
    }

    /* Mobile modal */
    .modal-content {
        margin: var(--spacing-md);
        max-height: 80vh;
        border-radius: var(--radius-lg);
    }

    .modal-close {
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
    }

    /* Toast notifications - mobile position */
    .toast-container {
        top: 70px;
        left: var(--spacing-md);
        right: var(--spacing-md);
    }

    /* Loading overlay */
    .loading-overlay {
        top: 0;
    }

    /* Disable horizontal scroll */
    html,
    body {
        overflow-x: hidden;
    }

    /* Time slider - larger touch area */
    .slider {
        height: 8px;
        margin: var(--spacing-md) 0;
        touch-action: manipulation;
    }

    .slider::-webkit-slider-thumb {
        width: 32px;
        height: 32px;
    }

    /* Enable touch handling for all interactive elements */
    .form-input,
    .form-group,
    .checkbox-group,
    .btn-calculate,
    .toggle-btn,
    .poi-toggle {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    /* Checkbox - larger */
    .checkbox-group input[type="checkbox"] {
        width: 28px;
        height: 28px;
    }

    .checkbox-group label {
        font-size: 1rem;
    }

    /* POI toggles - larger */
    .poi-toggles {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .poi-toggle {
        padding: var(--spacing-md);
        min-height: 48px;
    }

    .toggle-label {
        font-size: 1rem;
    }

    /* Google Maps button - larger */
    .btn-google-maps {
        padding: 12px var(--spacing-md);
        font-size: 1rem;
        background: var(--bg-secondary);
        border-radius: var(--radius-md);
    }

    .action-buttons {
        flex-direction: column;
    }
}

/* Small mobile devices */
@media (max-width: 380px) {
    .sidebar-toggle {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.9rem;
    }

    .duration-value {
        font-size: 2rem;
    }

    .fab {
        width: 48px;
        height: 48px;
    }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Custom Map Markers */
.custom-marker {
    width: 32px;
    height: 32px;
    background: var(--ios-blue);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
}

.custom-marker.poi {
    background: var(--ios-orange);
    width: 28px;
    height: 28px;
    font-size: 0.65rem;
}

.custom-marker.start {
    background: var(--ios-green);
}

.custom-marker.end {
    background: var(--ios-red);
}