/* Flybot Styles - Mobile First, Modern Design */

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

:root {
    --primary-sage: #7c9885;
    --primary-sage-dark: #5a7a63;
    --primary-sage-light: #9fb5a5;
    --accent-coral: #d4876f;
    --accent-coral-light: #e5a791;
    --background-cream: #faf8f5;
    --surface-light: #f5f1ed;
    --surface-medium: #ede8e3;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --text-muted: #95a5a6;
    --border-color: #ddd6ce;
    --error-red: #d63031;
    --warning-orange: #e17055;
    --info-blue: #74b9ff;

    /* Mini Wing Mode - Orange Theme */
    --primary-orange: #f59e0b;
    --primary-orange-dark: #d97706;
    --primary-orange-light: #fde68a;
    --marker-orange: #fb923c;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--background-cream);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* App Header */
.app-header {
    background: linear-gradient(135deg, var(--primary-sage) 0%, var(--primary-sage-dark) 100%);
    padding: 0.0rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(90, 122, 99, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--background-cream);
    letter-spacing: 0.5px;
}

.app-logo {
    height: 90px;
    width: auto;
    display: block;
}

.app-subtitle {
    font-size: 0.875rem;
    color: rgba(250, 248, 245, 0.85);
    font-weight: 500;
}

.header-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-link {
    color: var(--background-cream);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.header-link:hover {
    background: rgba(250, 248, 245, 0.2);
}

/* Hamburger Menu */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.hamburger-line {
    width: 30px;
    height: 3px;
    background: var(--background-cream);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 90px; /* Height of app header */
    right: 0;
    background: var(--primary-sage-dark);
    border-radius: 0 0 0 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 99;
    min-width: 200px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.mobile-menu.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    z-index: 1500;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--background-cream);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(250, 248, 245, 0.1);
    transition: background 0.2s;
}

.mobile-menu-link:last-child {
    border-bottom: none;
}

.mobile-menu-link:hover {
    background: rgba(250, 248, 245, 0.15);
    z-index: 1500;
}

.favorites-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.telegram-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.telegram-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Container */
.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
    flex: 1;
    overflow-x: hidden;
}

/* Site Search */
.site-search-container {
    position: relative;
    margin-bottom: 1.5rem;
}

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

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    pointer-events: none;
}

.site-search-input {
    width: 100%;
    padding: 0.9rem 3rem 0.9rem 3rem;
    font-size: 0.95rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: white;
    color: var(--text-primary);
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.site-search-input:focus {
    outline: none;
    border-color: var(--primary-sage);
    box-shadow: 0 4px 12px rgba(124, 152, 133, 0.15);
}

.clear-search-btn {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.3rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.clear-search-btn:hover {
    background: var(--surface-medium);
    color: var(--text-primary);
}

.search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--primary-sage);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 50;
}

.search-results-header {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface-light);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-result-item {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.15s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--surface-light);
}

.search-result-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.search-result-channel {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.search-no-results {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Site Header */
.site-header {
    background: var(--surface-light);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Layout: Left content wraps around right-side compass */
.site-header-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.site-header-left {
    flex: 1;
    min-width: 0;
}

.site-title-block {
    margin-bottom: 1rem;
}

.site-title-row {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--primary-sage-dark);
}

.site-location-info {
    flex-shrink: 0;
}

.site-location-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 400;
}

.channel {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.site-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}

.badge {
    background: white;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.badge-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.badge-link:hover {
    background: var(--surface-light);
    border-color: var(--primary-sage);
    box-shadow: 0 2px 6px rgba(124, 152, 133, 0.15);
    transform: translateY(-1px);
}

.badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.badge-icon img {
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

/* Closed Site Badge - Red Warning */
.badge-closed {
    background: #fee2e2;
    border-color: #dc2626;
    color: #991b1b;
    font-weight: 600;
    border-width: 2px;
}

.site-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
    margin-top: 0.8rem;
}

.info-item {
    background: white;
    padding: 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
}

.club-link {
    display: inline-block;
    margin-top: 0.8rem;
    color: var(--primary-sage-dark);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.7rem 1.3rem;
    background: white;
    border-radius: 10px;
    border: 2px solid var(--primary-sage);
    transition: all 0.2s;
    font-weight: 500;
}

.club-link:hover {
    background: var(--primary-sage);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 152, 133, 0.25);
}

/* Keywords Section - Full width horizontal bar at bottom */
.keywords-section {
    margin-top: 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.keywords-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.keyword-tag {
    background: var(--accent-coral);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 14px;
    font-size: 0.8rem;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(212, 135, 111, 0.2);
}

/* Wind Compass Card - Right side box */
.wind-compass-card {
    background: white;
    border: 2px solid var(--primary-sage);
    border-radius: 12px;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(124, 152, 133, 0.15);
}

.compass-svg {
    display: block;
    margin-bottom: 0.6rem;
}

.wind-compass-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.wind-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    line-height: 1.3;
}

.wind-speed-current {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ef4444;
    padding: 0.4rem;
    background: var(--surface-light);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

/* Site Guide Link */
.site-guide-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
    color: var(--primary-sage-dark);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.7rem 1.3rem;
    background: white;
    border-radius: 10px;
    border: 2px solid var(--primary-sage);
    transition: all 0.2s;
    font-weight: 500;
}

.site-guide-link:hover {
    background: var(--primary-sage);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 152, 133, 0.25);
}

.link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.link-icon img {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

/* Site Description - Positioned after badges */
.site-description {
    margin-bottom: 0.8rem;
    padding: 1.2rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.description-content {
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Site Guide Link Button */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    background: white;
    border: 2px solid var(--primary-sage);
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-top: 0.8rem;
}

.btn-action:hover {
    background: var(--primary-sage-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 152, 133, 0.25);
}

.link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.link-icon img {
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

/* Wind Compass Container - Right side vertical stack */
.wind-compass-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    flex-shrink: 0;
}

/* Favorite Button - Beneath compass (matches compass width) */
.btn-favorite-compass {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.5rem 0.6rem;
    width: calc(120px + 1.6rem + 4px); /* Matches compass card width (120px SVG + 2*0.8rem padding + 2*2px border) */
    background: white;
    border: 2px solid var(--primary-sage);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    white-space: nowrap;
}

.btn-favorite-compass:hover {
    background: var(--primary-sage-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 152, 133, 0.25);
}

.btn-favorite-compass.is-favorite {
    background: var(--primary-sage);
    color: white;
}

.btn-favorite-compass.is-favorite:hover {
    background: var(--primary-sage-dark);
}

/* Favorite Button - Header style */
.btn-favorite-header {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    background: white;
    border: 2px solid var(--primary-sage);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    white-space: nowrap;
}

.btn-favorite-header:hover {
    background: var(--primary-sage-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 152, 133, 0.25);
}

.btn-favorite-header.is-favorite {
    background: var(--primary-sage);
    color: white;
}

.btn-favorite-header.is-favorite:hover {
    background: var(--primary-sage-dark);
}

/* Notes Section - Below map */
.notes-section {
    background: var(--surface-light);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.notes-title {
    font-size: 1.2rem;
    color: var(--primary-sage-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.notes-content {
    background: white;
    padding: 1.2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Forecast Section */
.forecast-section {
    background: var(--surface-light);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.forecast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.forecast-title {
    font-size: 1.3rem;
    color: var(--primary-sage-dark);
    font-weight: 600;
}

.day-selector {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.day-btn {
    padding: 0.6rem 1rem;
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    min-height: 44px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.day-btn:hover:not(.active) {
    background: var(--surface-medium);
    color: var(--text-primary);
    border-color: var(--primary-sage);
}

.day-btn.active {
    background: var(--primary-sage);
    color: white;
    border-color: var(--primary-sage);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(124, 152, 133, 0.25);
}

/* Graph Container */
.graph-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.graph-content {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 580px;
}

.graph-svg {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
}

/* Flyability Key - Below Day Selector */
.flyability-key {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.flyability-key-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.flyability-key-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

/* Model Attribution - Below Graph */
.model-attribution {
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.model-attribution p {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin: 0;
    font-weight: 400;
}

/* Forecast Controls Container (Wind Unit Selector + Tide Times) */
.forecast-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin: 0.5rem 0;
    padding: 0 1rem;
    flex-wrap: wrap;
}

/* Wind Speed Unit Selector */
.wind-unit-selector {
    display: flex;
    gap: 0;
}

.wind-unit-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #d1d5db;
    background: white;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.wind-unit-btn:first-child {
    border-radius: 6px 0 0 6px;
}

.wind-unit-btn:last-child {
    border-radius: 0 6px 6px 0;
    border-left: none;
}

.wind-unit-btn:hover {
    background: #f3f4f6;
}

.wind-unit-btn.active {
    background: #7c9885;
    color: white;
    border-color: #7c9885;
}

/* Action Bar */
.action-bar {
    background: var(--surface-light);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.btn-action-bar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem;
    background: white;
    border: 2px solid var(--primary-sage);
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    white-space: nowrap;
    flex: 0 1 auto;
    min-width: 180px;
    min-height: 44px;
    height: 44px;
    box-sizing: border-box;
    vertical-align: middle;
    margin: 0;
}

.btn-action-bar:hover {
    background: var(--primary-sage-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 152, 133, 0.25);
}

.btn-action-bar.is-favorite {
    background: var(--primary-sage);
    color: white;
}

.btn-action-bar.is-favorite:hover {
    background: var(--primary-sage-dark);
}

/* Links Dropdown */
.links-dropdown-container {
    position: relative;
    flex: 0 1 auto;
    min-width: 180px;
}

.links-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    background: white;
    border: 2px solid var(--primary-sage);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    overflow: hidden;
    min-width: 260px;
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.2rem;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
}

.dropdown-link:last-child {
    border-bottom: none;
}

.dropdown-link:hover {
    background: var(--primary-sage-light);
    color: var(--text-primary);
}

/* Ad Container */
.ad-container {
    background: var(--surface-light);
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.ad-placeholder {
    background: white;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
}

.ad-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.ad-content {
    width: 100%;
    max-width: 728px;
}

.subscription-notice {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.subscription-link {
    color: var(--accent-coral);
    text-decoration: none;
    font-weight: 500;
}

.subscription-link:hover {
    text-decoration: underline;
    color: var(--accent-coral-light);
}

/* Map Section */
.map-section {
    background: var(--surface-light);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.map-title {
    font-size: 1.2rem;
    color: var(--primary-sage-dark);
    margin-bottom: 0;
    font-weight: 600;
}

.btn-get-directions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--primary-sage);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-get-directions:hover {
    background: var(--primary-sage-dark);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.btn-get-directions:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.directions-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Tide Times Button */
.btn-tide-times {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: #06b6d4;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-decoration: none;
    white-space: nowrap;
}

.btn-tide-times:hover {
    background: #0891b2;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.btn-tide-times:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#map {
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Footer */
.footer {
    background: var(--surface-light);
    padding: 1.5rem;
    text-align: center;
    margin-top: 2rem;
    border-top: 2px solid var(--border-color);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0.3rem 0;
}

.footer a {
    color: var(--primary-sage-dark);
    text-decoration: none;
    font-weight: 500;
}

.footer a:hover {
    text-decoration: underline;
    color: var(--accent-coral);
}

/* Responsive Design */
/* Tablet and mobile - horizontal tile layout for favorites */
@media (max-width: 1024px) {
    /* Dashboard: Force single column for favorites grid */
    .favorites-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
        width: 100%;
        max-width: 100%;
    }

    /* Transform cards to horizontal bars */
    .favorite-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        padding: 0.6rem 0.75rem;
        gap: 1rem;
        min-height: auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Left section: Site name and channel */
    .card-header {
        flex: 0 0 auto;
        min-width: 0;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        padding-right: 0.5rem !important;
        border-bottom: none !important;
        border-right: 1px solid var(--border-color);
        max-width: 35%;
    }

    .card-site-name {
        font-size: 0.9rem;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .card-channel {
        font-size: 0.65rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* ... other rules ... */
    .card-data-grid {
        flex: 1 !important;
        display: flex !important;
        flex-direction: row !important;
        /* Use justify-content for spacing instead of a large fixed gap */
        justify-content: space-around !important; 
        align-items: center;
        overflow: hidden;
        flex-wrap: nowrap !important;
        padding-right: 0.75rem;
        border-right: 1px solid var(--border-color);
        /* Remove the fixed gap that causes overflow */
        gap: 0.5rem !important; /* Optional: a small gap for safety */
    }
    /* ... other rules ... */

    /* Hide desktop-only elements on mobile */
    .card-data-grid .desktop-only {
        display: none !important;
    }

    .card-data-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0 !important;
        border-bottom: none !important;
        min-width: auto;
        position: relative;
    }

    /* Add separator between Wind and Times data */
    .card-data-row:first-child::after {
        content: '';
        position: absolute;
        right: -1.75rem;
        top: 50%;
        transform: translateY(-50%);
        height: 60%;
        width: 1px;
        background-color: rgba(221, 214, 206, 0.5);
    }

    .card-label {
        font-size: 0.6rem;
        margin-bottom: 0.1rem;
        white-space: nowrap;
    }

    .card-value {
        font-size: 0.75rem;
        font-weight: 600;
        white-space: nowrap;
    }

    /* Right section: Flyability score */
    .card-flyability {
        flex: 0 0 auto !important;
        font-size: 1.6rem !important;
        font-weight: 700;
        margin: 0 !important;
        margin-left: 0.5rem !important;
        text-align: center;
        min-width: 60px;
    }

    /* Donation tile: Keep vertical for mobile */
    .donation-tile {
        flex-direction: column !important;
        padding: 0.75rem;
    }

    .donation-tile .card-header {
        max-width: none !important;
    }
}

@media (max-width: 768px) {
    /* Show hamburger, hide regular nav links */
    .hamburger-btn {
        display: flex;
    }

    .header-links {
        display: none;
    }

    .container {
        padding: 0.8rem;
    }

    /* Fix ad section overflow */
    .ad-content {
        flex-direction: column !important;
        padding: 0.75rem 1rem !important;
        gap: 1rem !important;
    }

    .ad-content > div {
        flex: none !important;
        width: 100% !important;
    }

    .ad-content > div:first-child {
        text-align: center !important;
    }

    .ad-content > div:last-child {
        width: 100% !important;
        align-items: center !important;
    }

    .ad-content h3 {
        font-size: 1rem !important;
    }

    .ad-content p {
        font-size: 0.85rem !important;
    }

    /* Ensure all elements stay within viewport */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Prevent word overflow */
    p, span, div, a, h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    /* Constrain wide elements */
    svg, img, iframe, video {
        max-width: 100% !important;
        height: auto;
    }

    .site-search-container {
        margin-bottom: 1rem;
        width: 100%;
        max-width: 100%;
    }

    .site-search-input {
        font-size: 0.9rem;
        padding: 0.8rem 2.5rem 0.8rem 2.5rem;
    }

    /* Dashboard responsive */
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-title {
        font-size: 1.5rem;
    }

    /* Change to single column full-width layout */
    .favorites-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
        width: 100%;
        max-width: 100%;
    }

    /* Transform cards to horizontal bars */
    .favorite-card {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding: 0.6rem 0.75rem;
        gap: 0.75rem;
        min-height: auto;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Left section: Site name and channel */
    .card-header {
        flex: 0 0 auto;
        min-width: 0;
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
        max-width: 40%;
    }

    .card-site-name {
        font-size: 0.9rem;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .card-channel {
        font-size: 0.65rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Center section: Condensed info */
    .card-data-grid {
        flex: 1 !important;
        display: flex !important;
        flex-direction: row !important;
        /* Use justify-content for spacing instead of a large fixed gap */
        justify-content: space-around !important; 
        align-items: center;
        overflow: hidden;
        flex-wrap: nowrap !important;
        padding-right: 0.75rem;
        border-right: 1px solid var(--border-color);
        /* Remove the fixed gap that causes overflow */
        gap: 0.5rem !important; /* Optional: a small gap for safety */
    }

    .card-data-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        border-bottom: none;
        min-width: auto;
        position: relative;
    }

    /* Add separator between Wind and Times data */
    .card-data-row:first-child::after {
        content: '';
        position: absolute;
        right: -1.75rem;
        top: 50%;
        transform: translateY(-50%);
        height: 60%;
        width: 1px;
        background-color: rgba(221, 214, 206, 0.5);
    }

    .card-label {
        font-size: 0.6rem;
        margin-bottom: 0.1rem;
    }

    .card-value {
        font-size: 0.7rem;
        font-weight: 600;
    }

    /* Right section: Flyability score */
    .card-flyability {
        flex: 0 0 auto;
        font-size: 1.6rem;
        font-weight: 700;
        margin: 0;
        text-align: right;
        min-width: 60px;
    }

    /* Donation tile: Keep vertical for mobile */
    .donation-tile {
        flex-direction: column;
        padding: 0.75rem;
    }

    .donation-tile .card-header {
        max-width: none;
    }

    .search-icon {
        left: 0.8rem;
    }

    .clear-search-btn {
        right: 0.8rem;
    }

    .site-header,
    .forecast-section,
    .map-section,
    .notes-section,
    .ad-container,
    .action-bar {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .action-bar {
        flex-direction: column;
        gap: 0.8rem;
    }

    .btn-action-bar {
        width: 100%;
        min-width: 100%;
        justify-content: center;
    }

    .links-dropdown-container {
        flex: none;
        width: 100%;
        min-width: 100%;
    }

    .links-dropdown {
        left: 0;
        min-width: 100%;
        width: 100%;
    }

    /* Two-column layout on mobile: site name left, compass right */
    .site-header-layout {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 1rem 1rem;
        align-items: start;
    }

    .site-header-left {
        grid-column: 1 / -1;
        display: contents;
    }

    .site-title-block {
        grid-column: 1;
        margin-bottom: 0;
        min-width: 0;
    }

    .site-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .site-location-info {
        flex-shrink: 1;
    }

    .site-location-text {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .wind-compass-container {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
        margin-top: 0;
    }

    .site-badges {
        grid-column: 1 / -1;
    }

    .site-description {
        grid-column: 1 / -1;
    }

    .btn-action {
        grid-column: 1 / -1;
    }

    .site-name {
        font-size: 1.5rem;
    }

    .forecast-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .day-selector {
        width: 100%;
        justify-content: space-between;
    }

    .day-btn {
        flex: 1;
        padding: 0.6rem 0.4rem;
        font-size: 0.8rem;
    }

    .graph-content {
        height: 350px;
    }

    #map {
        height: 300px;
    }

    .map-header {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-get-directions {
        width: 100%;
        justify-content: center;
        padding: 0.75rem 1.2rem;
        font-size: 1rem;
    }

    .forecast-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .wind-unit-selector {
        justify-content: center;
    }

    .btn-tide-times {
        width: 100%;
        justify-content: center;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .footer {
        padding: 1rem;
    }

    .footer img {
        max-height: 25px !important;
        height: 25px !important;
    }

    .ad-placeholder {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    .app-title {
        font-size: 1.2rem;
    }

    .app-logo {
        height: 70px;
        max-height: 70px;
    }

    .app-subtitle {
        font-size: 0.75rem;
    }

    .site-name {
        font-size: 1.3rem;
    }

    .site-info {
        grid-template-columns: 1fr;
    }

    .day-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.3rem;
    }

    .dashboard-title {
        font-size: 1.3rem;
    }

    .favorites-grid {
        grid-template-columns: 1fr;
    }

    /* Further compress horizontal cards for small screens */
    .card-header {
        max-width: 35%;
    }

    .card-site-name {
        font-size: 0.85rem;
    }

    .card-channel {
        font-size: 0.6rem;
    }

    .card-label {
        font-size: 0.55rem;
    }

    .card-value {
        font-size: 0.65rem;
    }

    .card-flyability {
        font-size: 1.4rem;
        min-width: 50px;
    }

    .empty-state {
        padding: 3rem 1.5rem;
    }

    .empty-icon {
        font-size: 3rem;
    }

    .container {
        padding: 0.5rem;
    }

    .app-header {
        padding: 0rem 0.8rem;
    }

    .ad-content {
        padding: 0.5rem !important;
    }

    .ad-content h3 {
        font-size: 0.95rem !important;
    }

    .ad-content p {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }

    .footer img {
        max-height: 20px !important;
        height: 20px !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dashboard Page Styles */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-title {
    font-size: 1.8rem;
    color: var(--primary-sage-dark);
    font-weight: 700;
    margin: 0;
}

/* Favorites Grid */
.favorites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Favorite Card - 50% smaller */
.favorite-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.2s;
    cursor: pointer;
}

.favorite-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 152, 133, 0.2);
    border-color: var(--primary-sage);
}

/* Donation tile styling */
.donation-tile {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9e7 100%);
    border-color: #fbbf24;
    cursor: default !important;
}

.donation-tile:hover {
    transform: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-color: #fbbf24;
}

.donation-tile a:hover {
    background: #ffcc00 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

.card-header {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--surface-medium);
}

.card-site-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.card-channel {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Flyability Percentage - 50% smaller */
.card-flyability {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin: 0.5rem 0;
    line-height: 1;
}

/* Data Grid */
.card-data-grid {
    display: flex;
    flex-direction: column;
    gap: 0.10rem;
}

.card-data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.10rem 0;
    border-bottom: 1px solid var(--surface-light);
}

.card-data-row:last-child {
    border-bottom: none;
}

.card-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.card-value {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--surface-light);
    border-radius: 16px;
    border: 2px dashed var(--border-color);
    margin: 2rem 0;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h2 {
    font-size: 1.5rem;
    color: var(--primary-sage-dark);
    margin-bottom: 0.8rem;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.btn-primary {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: var(--primary-sage);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(124, 152, 133, 0.25);
}

.btn-primary:hover {
    background: var(--primary-sage-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 152, 133, 0.35);
}

/* About Page Styles */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-title {
    font-size: 2rem;
    color: var(--primary-sage-dark);
    margin-bottom: 2rem;
    font-weight: 700;
}

.about-section {
    background: var(--surface-light);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
}

.about-section h2 {
    font-size: 1.3rem;
    color: var(--primary-sage-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.about-section p {
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.about-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.about-section li {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .about-title {
        font-size: 1.6rem;
    }

    .about-section {
        padding: 1rem;
    }

    .about-section h2 {
        font-size: 1.1rem;
    }
}

/* NOTAM Modal Styles */
.notam-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.notam-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.notam-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.notam-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-sage-light) 0%, var(--primary-sage) 100%);
    border-radius: 16px 16px 0 0;
}

.notam-modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.notam-modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.notam-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.notam-modal-body {
    padding: 1.5rem;
}

.notam-guidance {
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.notam-guidance p {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.notam-guidance ul {
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
}

.notam-guidance li {
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

.notam-warning {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #92400e;
    font-size: 0.9rem;
}

.notam-form-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.notam-form-section:last-of-type {
    border-bottom: none;
}

.notam-form-section h3 {
    font-size: 1.1rem;
    color: var(--primary-sage-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.notam-form-row {
    margin-bottom: 1rem;
}

.notam-form-row label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.notam-form-row input[type="text"],
.notam-form-row input[type="date"],
.notam-form-row input[type="time"],
.notam-form-row input[type="tel"],
.notam-form-row input[type="email"],
.notam-form-row select,
.notam-form-row textarea {
    width: 100%;
    padding: 0.7rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: white;
    transition: all 0.2s;
}

.notam-form-row input:focus,
.notam-form-row select:focus,
.notam-form-row textarea:focus {
    outline: none;
    border-color: var(--primary-sage);
    box-shadow: 0 0 0 3px rgba(124, 152, 133, 0.1);
}

.notam-form-row input[readonly] {
    background: var(--surface-light);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.notam-time-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notam-time-inputs input {
    flex: 1;
}

.notam-time-inputs span {
    color: var(--text-secondary);
    font-weight: 500;
}

.notam-help-text {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

.notam-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notam-checkboxes label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0;
}

.notam-checkboxes input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.notam-info-box {
    background: #dbeafe;
    border: 1px solid #3b82f6;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}

.notam-info-box p {
    margin: 0 0 0.5rem 0;
    color: #1e3a8a;
}

.notam-info-box ul {
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
}

.notam-info-box li {
    margin-bottom: 0.3rem;
    color: #1e3a8a;
}

.notam-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.btn-notam-primary {
    padding: 0.9rem 1.8rem;
    background: var(--primary-sage);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(124, 152, 133, 0.25);
}

.btn-notam-primary:hover {
    background: var(--primary-sage-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 152, 133, 0.35);
}

.btn-notam-secondary {
    padding: 0.9rem 1.5rem;
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-notam-secondary:hover {
    background: var(--surface-light);
    border-color: var(--primary-sage);
}

.notam-contact-info {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.notam-contact-info p {
    margin: 0;
    color: var(--text-secondary);
}

/* Responsive NOTAM Modal */
@media (max-width: 768px) {
    .notam-modal {
        padding: 0.5rem;
    }

    .notam-modal-content {
        max-height: 95vh;
    }

    .notam-modal-header {
        padding: 1rem;
    }

    .notam-modal-title {
        font-size: 1.2rem;
    }

    .notam-modal-body {
        padding: 1rem;
    }

    .notam-modal-actions {
        flex-direction: column;
        gap: 0.8rem;
    }

    .btn-notam-primary,
    .btn-notam-secondary {
        width: 100%;
    }
}

/* Site Submission Modal Styles */
.site-submission-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.site-submission-modal.active {
    display: flex;
}

.site-submission-modal .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.site-submission-modal .modal-container {
    position: relative;
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.site-submission-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-sage-light) 0%, var(--primary-sage) 100%);
    border-radius: 16px 16px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-submission-modal .modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.site-submission-modal .close-modal {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.site-submission-modal .close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.site-submission-modal .modal-body {
    padding: 1.5rem;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.tab-btn {
    padding: 0.6rem 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px 8px 0 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: none;
}

.tab-btn:hover {
    background: var(--surface-light);
    border-color: var(--primary-sage);
}

.tab-btn.active {
    background: var(--primary-sage);
    color: white;
    border-color: var(--primary-sage);
    font-weight: 600;
}

/* Tab Content */
.tab-content {
    min-height: 400px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane h3 {
    font-size: 1.2rem;
    color: var(--primary-sage-dark);
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.tab-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}

/* Form Fields */
.form-field {
    margin-bottom: 1.2rem;
}

.form-field label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.form-field input[type="text"],
.form-field input[type="number"],
.form-field input[type="email"],
.form-field input[type="url"],
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 0.7rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: white;
    transition: all 0.2s;
    font-family: inherit;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary-sage);
    box-shadow: 0 0 0 3px rgba(124, 152, 133, 0.1);
}

.form-field input[readonly],
.form-field input:disabled {
    background: var(--surface-light);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.form-field.valid input,
.form-field.valid select,
.form-field.valid textarea {
    border-color: #10b981;
}

.form-field.valid::after {
    content: '✓';
    position: absolute;
    right: 0.7rem;
    top: 2.4rem;
    color: #10b981;
    font-weight: bold;
}

.form-field.invalid input,
.form-field.invalid select,
.form-field.invalid textarea {
    border-color: var(--error-red);
}

.field-error {
    display: block;
    color: var(--error-red);
    font-size: 0.8rem;
    margin-top: 0.3rem;
    min-height: 1.2rem;
}

.field-help {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
    font-style: italic;
}

.char-counter {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: right;
    margin-top: 0.2rem;
    font-family: monospace;
}

/* Toggle Buttons */
.toggle-group {
    display: flex;
    gap: 0.5rem;
}

.toggle-btn {
    flex: 1;
    padding: 0.7rem 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn:hover {
    background: var(--surface-light);
    border-color: var(--primary-sage);
}

.toggle-btn.active {
    background: var(--primary-sage);
    color: white;
    border-color: var(--primary-sage);
    font-weight: 600;
}

/* Wind Range Selector */
.wind-range-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.8rem;
}

.wind-range-input-group input {
    flex: 1;
}

.wind-range-input-group span {
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-add-range {
    padding: 0.7rem 1.2rem;
    background: var(--primary-sage);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-add-range:hover {
    background: var(--primary-sage-dark);
}

.wind-ranges-list {
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.8rem;
    min-height: 60px;
    margin-bottom: 0.5rem;
}

.no-ranges {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 0.8rem;
}

.wind-range-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.5rem;
}

.wind-range-item:last-child {
    margin-bottom: 0;
}

.remove-range-btn {
    background: var(--error-red);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.2s;
}

.remove-range-btn:hover {
    background: #b91c1c;
}

.wind-compass-preview {
    display: flex;
    justify-content: center;
    padding: 1rem;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

/* Modal Footer */
.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
    margin-top: 1.5rem;
    position: sticky;
    bottom: 0;
    background: white;
    z-index: 10;
}

.btn-secondary {
    padding: 0.9rem 1.5rem;
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--surface-light);
    border-color: var(--primary-sage);
}

.btn-primary {
    padding: 0.9rem 1.8rem;
    background: var(--primary-sage);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(124, 152, 133, 0.25);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-sage-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 152, 133, 0.35);
}

.btn-primary:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

/* Responsive Site Submission Modal */
@media (max-width: 768px) {
    .site-submission-modal {
        padding: 0.5rem;
    }

    .site-submission-modal .modal-container {
        max-height: 95vh;
    }

    .site-submission-modal .modal-header {
        padding: 1rem;
    }

    .site-submission-modal .modal-title {
        font-size: 1.2rem;
    }

    .site-submission-modal .modal-body {
        padding: 1rem;
    }

    .tab-navigation {
        gap: 0.3rem;
    }

    .tab-btn {
        padding: 0.5rem 0.7rem;
        font-size: 0.75rem;
    }

    .toggle-group {
        flex-direction: column;
    }

    .toggle-btn {
        width: 100%;
    }

    .wind-range-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .wind-range-input-group input {
        width: 100%;
    }

    .btn-add-range {
        width: 100%;
    }

    .modal-footer {
        flex-direction: column;
        gap: 0.8rem;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

/* ============================================================================
   MAP PAGE STYLES
   ============================================================================ */

/* Map Page - Ensure full height */
body.map-page {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

html.map-page-html {
    height: 100%;
    overflow: hidden;
}


/* Map Container - Full Screen (only for map page, not the site location map) */
body.map-page #map {
    position: fixed !important;
    top: 90px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: calc(100vh - 90px) !important;
    z-index: 1 !important;
    border-radius: 0 !important;
    border: none !important;
}

/* Keep the existing map-section map styled normally */
.map-section #map {
    height: 350px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
}

/* Map Search Container - Top Left */
.map-search-container {
    position: absolute;
    top: 110px;
    left: 20px;
    z-index: 1010;
    width: 320px;
}

.map-search-input {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 0.95rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: white;
    color: var(--text-primary);
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.map-search-input:focus {
    outline: none;
    border-color: var(--primary-sage);
    box-shadow: 0 6px 16px rgba(124, 152, 133, 0.25);
}

.map-search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--primary-sage);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1100;
    display: none; /* Controlled by JavaScript */
}

.search-section-header {
    padding: 0.6rem 1rem;
    background: var(--surface-light);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.search-result-item {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.9rem;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--primary-sage-light);
    color: white;
}

.search-result-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.search-result-channel {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.search-result-item:hover .search-result-name {
    color: white;
}

.search-result-item:hover .search-result-channel {
    color: rgba(255, 255, 255, 0.8);
}

.search-no-results,
.search-hint {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Day Selector - Top Right of Map */
.map-day-selector {
    position: absolute;
    top: 110px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 0.4rem;
    background: transparent;
    padding: 0.5rem;
    border-radius: 12px;
}

.map-day-selector .day-btn {
    padding: 0.6rem 1rem;
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    min-height: 40px;
}

.map-day-selector .day-btn:hover:not(.active) {
    background: var(--surface-medium);
    color: var(--text-primary);
    border-color: var(--primary-sage);
}

.map-day-selector .day-btn.active {
    background: var(--primary-sage);
    color: white;
    border-color: var(--primary-sage);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(124, 152, 133, 0.25);
}

/* Site Filter Toggle (Desktop Only - Below Day Selector) */
.map-site-filter-desktop {
    position: absolute;
    top: 165px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 0.4rem;
    background: transparent;
    padding: 0.5rem;
    border-radius: 12px;
}

.map-site-filter-desktop .site-filter-btn {
    padding: 0.6rem 1rem;
    background: white;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    min-height: 40px;
}

.map-site-filter-desktop .site-filter-btn:hover:not(.active) {
    background: var(--surface-medium);
    color: var(--text-primary);
    border-color: var(--primary-sage);
}

.map-site-filter-desktop .site-filter-btn.active {
    background: var(--primary-sage);
    color: white;
    border-color: var(--primary-sage);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(124, 152, 133, 0.25);
}

/* Mobile Settings Button (Cog Icon) */
.map-settings-btn {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--primary-sage);
    cursor: pointer;
    padding: 0;
    margin-right: -120px;
    transition: all 0.2s;
}

.map-settings-btn:hover {
    color: var(--primary-sage-dark);
    transform: rotate(45deg);
}

.map-settings-btn svg {
    width: 30px;
    height: 30px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Mobile Settings Menu (Dropdown) */
.map-settings-menu {
    position: fixed;
    top: 70px;
    right: 10px;
    z-index: 2000;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 160px;
    display: none;
}

.map-settings-menu.show {
    display: block;
}

.map-settings-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}

.map-settings-option {
    width: 100%;
    padding: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
}

.map-settings-option:hover:not(.active) {
    background: var(--surface-medium);
}

.map-settings-option.active {
    background: var(--primary-sage);
    color: white;
    font-weight: 600;
}

/* My Location Button - Bottom Right */
.map-location-btn {
    position: absolute;
    bottom: 40px;
    right: 20px;
    z-index: 1000;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--primary-sage);
    color: var(--primary-sage);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.2s;
}

.map-location-btn:hover {
    background: var(--primary-sage);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(124, 152, 133, 0.3);
}

.map-location-btn svg {
    width: 24px;
    height: 24px;
}

/* Zoom Controls - Bottom Left */
.map-zoom-controls {
    position: absolute;
    bottom: 40px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.zoom-btn {
    width: 44px;
    height: 44px;
    background: white;
    border: 2px solid var(--primary-sage);
    border-radius: 8px;
    color: var(--primary-sage);
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.2s;
    line-height: 1;
}

.zoom-btn:hover {
    background: var(--primary-sage);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(124, 152, 133, 0.3);
}

/* Custom Map Markers - Teardrop Shape */
.site-marker-container {
    border: none !important;
    background: transparent !important;
}

.site-marker {
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.site-marker::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50% 50% 50% 0;
    border: 2px solid white;
    box-sizing: border-box;
}

.site-marker:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5));
}

/* Marker Colors */
.marker-grey::before {
    background: #6b7280;
}

.marker-green::before {
    background: #22c55e;
}

.marker-orange::before {
    background: var(--marker-orange);
}

.marker-purple::before {
    background: #9333ea;
}

/* Marker Sizes - Teardrop proportions */
.marker-small {
    width: 16px;
    height: 20px;
}

.marker-small::before {
    width: 16px;
    height: 16px;
    transform: translateX(-50%) rotate(-45deg);
}

.marker-medium {
    width: 20px;
    height: 25px;
}

.marker-medium::before {
    width: 20px;
    height: 20px;
    transform: translateX(-50%) rotate(-45deg);
}

.marker-large {
    width: 24px;
    height: 30px;
}

.marker-large::before {
    width: 24px;
    height: 24px;
    transform: translateX(-50%) rotate(-45deg);
}

/* Marker Cluster Styles */
.marker-cluster {
    background-color: rgba(124, 152, 133, 0.6);
    border: 2px solid var(--primary-sage);
    border-radius: 50%;
}

.marker-cluster div {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-sage);
    border-radius: 50%;
}

.marker-cluster span {
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

.marker-cluster-small div {
    background-color: var(--primary-sage-light);
}

.marker-cluster-medium div {
    background-color: var(--primary-sage);
}

.marker-cluster-large div {
    background-color: var(--primary-sage-dark);
}

/* Map Tile Popup */
.map-tile-popup {
    opacity: 1 !important;
}

.map-tile-popup .leaflet-popup-content-wrapper {
    background-color: #ffffff !important;
    opacity: 1 !important;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 0 !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.map-tile-popup .leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
    min-width: 260px;
    max-width: 280px;
    background-color: #ffffff !important;
    opacity: 1 !important;
}

.map-tile-popup .leaflet-popup-tip {
    background-color: #ffffff !important;
    border: 2px solid var(--border-color);
    border-top: none;
    border-right: none;
}

.map-tile {
    padding: 1rem;
    background-color: #ffffff !important;
    opacity: 1 !important;
}

.map-tile .tile-header {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.map-tile .tile-channel {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

.map-tile .tile-not-flyable {
    text-align: center;
    color: var(--text-muted);
    padding: 1rem 0;
    font-size: 0.9rem;
}

.map-tile .tile-data-grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.map-tile .tile-flyability {
    text-align: center;
    padding: 0.6rem;
    background: var(--surface-light);
    border-radius: 8px;
    margin-bottom: 0.4rem;
}

.map-tile .tile-flyability-value {
    font-size: 1.8rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.map-tile .tile-flyability-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.3rem;
}

.map-tile .tile-data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--surface-light);
}

.map-tile .tile-data-row:last-child {
    border-bottom: none;
}

.map-tile .tile-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.map-tile .tile-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.map-tile .tile-link {
    display: block;
    text-align: center;
    padding: 0.7rem;
    background: var(--primary-sage);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

.map-tile .tile-link:hover {
    background: var(--primary-sage-dark);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(124, 152, 133, 0.3);
}

/* User Location Marker */
.user-location-marker {
    border: none !important;
    background: transparent !important;
}

.user-location-dot {
    width: 20px;
    height: 20px;
    background: #3b82f6;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-overlay p {
    color: white;
    font-size: 1rem;
    font-weight: 500;
}

/* Mobile Responsive - Map Page */
@media (max-width: 768px) {
    .map-search-container {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
        top: 75px;
    }

    .map-day-selector {
        top: 130px;
        right: 10px;
        left: 10px;
        justify-content: space-between;
        padding: 0.2rem;
        gap: 0.3rem;
    }

    .map-day-selector .day-btn {
        flex: 1;
        padding: 0.5rem 0.3rem;
        font-size: 0.75rem;
        min-height: 36px;
    }

    /* Hide desktop filter toggle on mobile */
    .map-site-filter-desktop {
        display: none;
    }

    /* Show mobile settings button on mobile */
    .map-settings-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .map-zoom-controls {
        bottom: 30px;
        left: 10px;
    }

    .zoom-btn {
        width: 40px;
        height: 40px;
    }

    .map-location-btn {
        bottom: 30px;
        right: 10px;
        width: 44px;
        height: 44px;
    }

    .map-location-btn svg {
        width: 20px;
        height: 20px;
    }

    body.map-page #map {
        top: 70px !important;
        height: calc(100vh - 70px) !important;
    }

    .app-header .app-logo {
        height: 70px;
    }

    .map-tile-popup .leaflet-popup-content {
        min-width: 200px;
        max-width: 220px;
    }

    .map-tile {
        padding: 0.4rem !important;
    }

    .map-tile .tile-header {
        font-size: 0.9rem;
        margin-bottom: 0.1rem;
    }

    .map-tile .tile-channel {
        font-size: 0.7rem;
        margin-bottom: 0.3rem;
    }

    .map-tile .tile-data-grid {
        gap: 0.25rem;
        margin-bottom: 0.4rem;
    }

    .map-tile .tile-flyability {
        padding: 0.3rem;
        margin-bottom: 0.15rem;
    }

    .map-tile .tile-flyability-value {
        font-size: 1.2rem;
    }

    .map-tile .tile-flyability-label {
        font-size: 0.6rem;
        margin-top: 0.1rem;
    }

    .map-tile .tile-data-row {
        padding: 0.2rem 0;
    }

    .map-tile .tile-label {
        font-size: 0.68rem;
    }

    .map-tile .tile-value {
        font-size: 0.75rem;
    }

    .map-tile .tile-link {
        padding: 0.4rem;
        font-size: 0.8rem;
        margin-top: 0.25rem;
    }

    .map-tile .tile-not-flyable {
        padding: 0.5rem 0;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.2rem;
    }

    .app-header .app-logo {
        height: 60px;
    }

    body.map-page #map {
        top: 60px !important;
        height: calc(100vh - 60px) !important;
    }

    .map-search-container {
        top: 65px;
    }

    .map-day-selector {
        top: 115px;
    }

    .map-search-input {
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
    }

    .map-day-selector .day-btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.2rem;
    }

    .zoom-btn {
        width: 36px;
        height: 36px;
        font-size: 1.3rem;
    }

    .map-location-btn {
        width: 40px;
        height: 40px;
    }

    .map-tile-popup .leaflet-popup-content {
        min-width: 180px;
        max-width: 200px;
    }

    .map-tile {
        padding: 0.35rem !important;
    }

    .map-tile .tile-header {
        font-size: 0.85rem;
        margin-bottom: 0.08rem;
    }

    .map-tile .tile-channel {
        font-size: 0.68rem;
        margin-bottom: 0.25rem;
    }

    .map-tile .tile-data-grid {
        gap: 0.2rem;
        margin-bottom: 0.35rem;
    }

    .map-tile .tile-flyability {
        padding: 0.25rem;
        margin-bottom: 0.1rem;
    }

    .map-tile .tile-flyability-value {
        font-size: 1.1rem;
    }

    .map-tile .tile-flyability-label {
        font-size: 0.58rem;
        margin-top: 0.08rem;
    }

    .map-tile .tile-data-row {
        padding: 0.15rem 0;
    }

    .map-tile .tile-label {
        font-size: 0.63rem;
    }

    .map-tile .tile-value {
        font-size: 0.7rem;
    }

    .map-tile .tile-link {
        padding: 0.35rem;
        font-size: 0.75rem;
        margin-top: 0.2rem;
    }

    .map-tile .tile-not-flyable {
        padding: 0.4rem 0;
        font-size: 0.75rem;
    }

    .map-tile-popup .leaflet-popup-tip {
        width: 15px;
        height: 15px;
    }
}

/* ============================================================================
   MINI WING MODE - ORANGE THEME
   ============================================================================ */

/* Apply orange theme when body has mini-wing-mode class */
.mini-wing-mode .app-header {
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-dark) 100%);
    box-shadow: 0 2px 12px rgba(217, 119, 6, 0.15);
}

.mini-wing-mode .day-btn.active,
.mini-wing-mode .map-day-selector .day-btn.active {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

.mini-wing-mode .day-btn:hover:not(.active),
.mini-wing-mode .map-day-selector .day-btn:hover:not(.active) {
    border-color: var(--primary-orange);
}

.mini-wing-mode .site-filter-btn.active,
.mini-wing-mode .map-site-filter-desktop .site-filter-btn.active {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

.mini-wing-mode .site-filter-btn:hover:not(.active),
.mini-wing-mode .map-site-filter-desktop .site-filter-btn:hover:not(.active) {
    border-color: var(--primary-orange);
}

.mini-wing-mode .map-settings-option.active {
    background: var(--primary-orange);
}

.mini-wing-mode .map-location-btn {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
}

.mini-wing-mode .map-location-btn:hover {
    background: var(--primary-orange);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.3);
}

.mini-wing-mode .zoom-btn {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
}

.mini-wing-mode .zoom-btn:hover {
    background: var(--primary-orange);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.3);
}

.mini-wing-mode .map-search-input:focus {
    border-color: var(--primary-orange);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.25);
}

.mini-wing-mode .map-search-results {
    border-color: var(--primary-orange);
}

.mini-wing-mode .search-result-item:hover {
    background: var(--primary-orange-light);
}

.mini-wing-mode .mobile-menu {
    background: var(--primary-orange-dark);
}

/* Mode toggle buttons share styles with active state using orange */
.mini-wing-mode .mode-toggle-btn.active,
.mini-wing-mode .map-mode-option.active {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
}

/* Tile popup "View Forecast" button */
.mini-wing-mode .map-tile .tile-link {
    background: var(--primary-orange);
}

.mini-wing-mode .map-tile .tile-link:hover {
    background: var(--primary-orange-dark);
    box-shadow: 0 3px 8px rgba(245, 158, 11, 0.3);
}

/* ============================================================================
   MODE TOGGLE BUTTONS
   ============================================================================ */

/* Desktop Mode Toggle - Below Search Container */
.map-mode-toggle-desktop {
    position: fixed;
    top: 170px;
    left: 20px;
    z-index: 1000;
    display: flex; /* Always visible on desktop */
    flex-direction: row;
    gap: 0.5rem;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

/* Hide on small screens */
@media (max-width: 767px) {
    .map-mode-toggle-desktop {
        display: none;
    }
}

.mode-toggle-btn {
    padding: 0.6rem 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    min-width: 120px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.mode-toggle-btn:hover:not(.active) {
    background: var(--surface-medium);
    color: var(--text-primary);
    border-color: var(--primary-sage);
}

.mode-toggle-btn.active {
    background: var(--primary-sage);
    color: white;
    border-color: var(--primary-sage);
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(124, 152, 133, 0.25);
}

/* Mobile Mode Options (in settings dropdown) */
.map-mode-option {
    width: 100%;
    padding: 0.8rem 1rem;
    background: white;
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.map-mode-option:hover:not(.active) {
    background: var(--surface-medium);
}

.map-mode-option.active {
    background: var(--primary-sage);
    color: white;
    font-weight: 600;
}

/* Divider between mode and filter sections */
.map-settings-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}