:root {
    --primary-blue: #003366;
    --secondary-blue: #004c99;
    --accent-gold: #c5a059;
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --bg-light: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* UI Visibility Utilities */
.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

/* Hide Scrollbars */
::-webkit-scrollbar {
    display: none;
}

* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Sidebar Styling */
.sidebar {
    width: 380px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.header {
    padding: 1rem 1.5rem;
    text-align: center;
}

.brand-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 0.4rem;
}

.app-logo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: var(--shadow-soft);
    object-fit: cover;
    background: white;
    padding: 2px;
}

.header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0;
    color: var(--accent-gold);
    text-transform: lowercase;
}

.header p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Mode Switcher */
.mode-switcher {
    display: flex;
    padding: 0 1.5rem;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.mode-btn {
    flex: 1;
    padding: 0.8rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mode-btn.active {
    background: var(--accent-gold);
    color: var(--primary-blue);
    border-color: var(--accent-gold);
}

/* Origin Selector Control */
.origin-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.origin-btn {
    flex: 1;
    padding: 0.6rem;
    border: none;
    background: transparent;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.origin-btn.active {
    background: var(--glass-bg);
    color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.origin-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Destinations */
.destinations {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 1.5rem;
}

.hidden {
    display: none !important;
}

/* Checklist Styles */
.checklist {
    list-style: none;
    margin-top: 1.5rem;
}

.checklist-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1rem;
    border-radius: 12px;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checklist-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.tour-info-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--accent-gold);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.tour-info-btn:hover {
    background: var(--accent-gold);
    color: var(--primary-blue);
    transform: scale(1.1);
}

.info-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.tour-tooltip {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    width: 200px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-soft);
    font-size: 0.8rem;
    color: var(--text-dark);
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.4;
    text-align: left;
}

.tour-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 8px solid var(--glass-bg);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.tour-tooltip.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

.checklist-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.checklist-item.disabled {
    cursor: not-allowed;
}

.checklist-item.disabled:hover {
    background: rgba(255, 255, 255, 0.05);
}

.checklist-main.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.checklist-item.completed {
    opacity: 0.5;
    background: rgba(0, 255, 0, 0.1);
}

.checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent-gold);
}

.tour-helper p {
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.4;
}

.primary-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent-gold);
    color: var(--primary-blue);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1rem;
}

.mobile-select-wrapper {
    margin-bottom: 0.8rem;
}

#destination-select {
    width: 100%;
    padding: 1.2rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    appearance: none;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
}

#destination-select option {
    background: var(--primary-blue);
    color: white;
}

#destination-list {
    list-style: none;
}

.destination-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.2rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.destination-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    border-color: var(--accent-gold);
}

.destination-item.active {
    background: var(--accent-gold);
    color: var(--primary-blue);
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
}

.dest-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.walking-time {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
    flex-shrink: 0;
    margin-left: 10px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .walking-time {
        font-size: 0.7rem;
        padding: 1px 6px;
    }
}

.destination-item h3 {
    font-size: 1rem;
    margin-bottom: 0;
}

.destination-item p {
    font-size: 0.8rem;
    opacity: 0.8;
}

.sidebar-footer {
    padding: 1.2rem 1.5rem;
    text-align: center;
}

.sidebar-footer p {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Map Section */
.map-section {
    flex: 1;
    position: relative;
    height: 100%;
}

#map {
    width: 100%;
    height: 100%;
}

/* Directions Panel */
.directions-panel {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 320px;
    max-height: calc(100vh - 3rem);
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    z-index: 20;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.directions-panel.hidden {
    transform: translateX(120%);
    opacity: 0;
    pointer-events: none;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 0.8rem;
}

#close-panel {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#steps-content {
    display: none;
    /* Quitamos las indicaciones detalladas */
}

/* Safety Warning Banner */
.safety-warning {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: #ff4d4d;
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(255, 77, 77, 0.4);
    z-index: 1000;
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    max-width: 90%;
    text-align: center;
}

.safety-warning.hidden {
    display: none;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.warning-icon {
    font-size: 1.5rem;
}

.adp-step {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Base Styles for Mobile Focus */
@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none;
    }

    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 40vh;
        overflow: hidden;
    }

    .header {
        padding: 0.4rem 1rem;
    }

    .header h1 {
        font-size: 1.1rem;
        margin-bottom: 0.2rem;
    }

    .header p {
        font-size: 0.8rem;
    }

    .destinations {
        padding: 1rem;
    }

    .sidebar-footer {
        padding: 0.8rem 1.5rem;
    }

    .directions-panel {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 50vh;
        border-radius: 24px 24px 0 0;
        transform: translateY(0);
        padding: 1.5rem;
    }

    .directions-panel.hidden {
        transform: translateY(100%);
    }

    /* Adjust Map UI for mobile if needed */
    .tour-tooltip {
        width: 300px;
        right: 40px;
        font-size: 0.85rem;
    }
}

/* Overlay for configuration */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.overlay.hidden {
    display: none;
}

.overlay-content {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    max-width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}