/* landing.css - Map landing page styles */

/* Override site body defaults for full-bleed map layout */
.landing-page {
    --header-height: 86px;  /* logo 50px + padding 32px + border 4px */
    --statusbar-height: 34px;
    display: block;
    overflow: hidden;
    height: 100vh;
    margin: 0;
    padding: 0;
}

.landing-page header {
    position: relative;
    z-index: 2000;
}

/* =========================================================================
   MAP
   ========================================================================= */

#map {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: var(--statusbar-height);
    z-index: 1;
}

/* Leaflet controls — keep default light theme for the landing page */
.leaflet-control-zoom a {
    background: white !important;
    color: #333 !important;
    border-color: #ccc !important;
}

.leaflet-control-zoom a:hover {
    background: #f4f4f4 !important;
}

/* =========================================================================
   LRS DOWNLOAD BANNER
   ========================================================================= */

.lrs-download-banner {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 20px;
    background: #1A3E63;
    border: 1px solid rgba(126, 200, 80, 0.3);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 0.85rem;
    width: max-content;
    max-width: 90%;
}

.lrs-banner-btn {
    padding: 5px 16px;
    background: #7EC850;
    color: #1A3E63;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.lrs-banner-btn:hover {
    background: #6fb543;
}

.lrs-banner-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* =========================================================================
   SEARCH BUTTON (floating on map)
   ========================================================================= */

.landing-search-btn {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    right: 16px;
    z-index: 800;
    padding: 8px 16px;
    background: #1A3E63;
    color: white;
    border: 1px solid rgba(126, 200, 80, 0.3);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: background 0.15s, transform 0.1s;
}

.landing-search-btn:hover {
    background: #254d78;
    transform: translateY(-1px);
}

/* =========================================================================
   DESK CTA (floating on map, bottom-right)
   ========================================================================= */

.desk-cta {
    position: fixed;
    bottom: 38px;
    right: 10px;
    z-index: 800;
    padding: 6px 14px;
    background: #1A3E63;
    color: #7EC850;
    border: 1px solid rgba(126, 200, 80, 0.3);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: background 0.15s;
}

.desk-cta:hover {
    background: #254d78;
    color: #9ade6a;
}

/* =========================================================================
   STATUS BAR
   ========================================================================= */

#statusbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 34px;
    background: #1A3E63;
    color: rgba(255, 255, 255, 0.85);
    z-index: 2000;
    display: flex;
    align-items: center;
    border-top: 2px solid #7EC850;
    font-size: 0.95rem;
    overflow: hidden;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.status-fields {
    display: flex;
    align-items: center;
    height: 100%;
    flex: 1;
    min-width: 0;
}

.status-field {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 12px;
    height: 100%;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap;
}

.status-field-coords {
    border-right: none;
}

.status-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(126, 200, 80, 0.7);
}

.status-value {
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: color 0.15s;
}

.status-value:hover {
    color: #7EC850;
}

.status-value.copied {
    color: #7EC850;
}

.status-message {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    background: #1A3E63;
    pointer-events: none;
}

.status-message:empty {
    display: none;
}

.status-copyright {
    margin-left: auto;
    padding: 0 14px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

/* =========================================================================
   SEARCH MODAL
   ========================================================================= */

.search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 5000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
}

.search-modal {
    background: #1A3E63;
    border: 1px solid rgba(126, 200, 80, 0.3);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    width: 280px;
}

.search-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.search-modal-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
}

.search-modal-close:hover {
    color: white;
}

.search-modal-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-modal-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-modal-row label {
    width: 28px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(126, 200, 80, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: right;
}

.search-modal-row input {
    flex: 1;
    padding: 6px 10px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    outline: none;
}

.search-modal-row input:focus {
    border-color: #7EC850;
    box-shadow: 0 0 0 2px rgba(126, 200, 80, 0.3);
}

.search-modal-footer {
    padding: 10px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
}

.search-modal-go {
    padding: 6px 18px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #7EC850;
    color: #1A3E63;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.search-modal-go:hover {
    background: #6fb543;
}

/* =========================================================================
   PICKER (route type / direction selection)
   ========================================================================= */

.picker-panel {
    position: fixed;
    top: calc(var(--header-height) + 52px);
    right: 16px;
    background: #1A3E63;
    border: 1px solid rgba(126, 200, 80, 0.3);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 3000;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    min-width: 180px;
    max-width: 260px;
    max-height: 60vh;
    overflow-y: auto;
    animation: pickerFadeIn 0.15s ease-out;
}

@keyframes pickerFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.picker-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(126, 200, 80, 0.7);
    padding: 2px 14px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 4px;
}

.picker-options {
    display: flex;
    flex-direction: column;
}

.picker-btn {
    padding: 7px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    background: transparent;
    color: white;
    border: none;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    transition: background 0.1s;
}

.picker-btn:hover {
    background: rgba(126, 200, 80, 0.2);
    color: #7EC850;
}

/* =========================================================================
   STATE LAYER TOOLTIP
   ========================================================================= */

.state-tooltip {
    background: #1A3E63 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 4px !important;
    padding: 4px 10px !important;
    font-size: 0.8rem !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

.state-tooltip.state-tooltip-active {
    color: white !important;
    border-color: rgba(126, 200, 80, 0.4) !important;
}

.state-tooltip::before {
    border-top-color: #1A3E63 !important;
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 768px) {
    .status-field {
        padding: 0 6px;
    }

    .status-label {
        display: none;
    }

    .landing-search-btn {
        top: calc(var(--header-height) + 6px);
        right: 10px;
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .picker-panel {
        top: calc(var(--header-height) + 42px);
        right: 10px;
    }

    .desk-cta {
        display: none;
    }
}

@media (max-width: 480px) {
    .status-field:nth-child(n+4) {
        display: none;
    }
}
