/* Layout - app shell, header, route selection, content area, map */

/* App Container */
.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 0.45rem 0.8rem;
    position: relative;
    overflow: visible;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.header-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
}

.header-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    position: relative;
    z-index: 1;
}

.header-menu-btn {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.header-menu-btn:hover,
.header-menu-btn:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.7);
}

.header-menu-btn svg {
    width: 20px;
    height: 20px;
}

.header-menu-panel {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    background: #fff;
    color: var(--text);
    border-bottom: 1px solid rgba(26, 58, 74, 0.1);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
    z-index: 220;
}

.header.menu-open .header-menu-panel {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
}

.header-menu-item {
    width: 100%;
    min-height: 52px;
    display: block;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 0.95rem 1rem;
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    text-decoration: none;
}

.header-menu-item:hover,
.header-menu-item:focus-visible {
    background: rgba(26, 58, 74, 0.06);
}

.brand-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.header-brand .brand-logo {
    width: 34px;
    height: 34px;
}

.header-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.header::before {
    content: '';
    position: absolute;
    top: -180px;
    right: -140px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.07) 0%, transparent 72%);
    border-radius: 50%;
}

.header h1 {
    font-family: 'Crimson Pro', serif;
    font-size: clamp(1.08rem, 2.2vw, 1.35rem);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.04rem;
    position: relative;
    z-index: 1;
}

.header p {
    font-size: clamp(0.8rem, 1.5vw, 0.95rem);
    opacity: 0.82;
    line-height: 1.25;
    position: relative;
    z-index: 1;
}

/* Route Selection */
.route-selection {
    background: white;
    padding: 0.75rem 0.8rem;
    box-shadow: 0 2px 8px var(--shadow);
    position: relative;
    z-index: 100;
}

.route-selection h2 {
    font-family: 'Crimson Pro', serif;
    font-size: 1rem;
    margin-bottom: 0.45rem;
    color: var(--primary);
}

.route-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.app-container.navigating .route-selection {
    display: none;
}

/* Main Content Area */
.content-area {
    flex: 1;
    position: relative;
    overflow: hidden;
}

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

/* Map adjustments during navigation */
.content-area.navigating #map {
    padding-top: 280px;
}

.location-status.hidden {
    display: none !important;
}
