/* wasserstand.fun -- Mobile-Anpassungen (Phase 2). Laedt NACH app.css, VOR app-redesign.css. Ausgelagert aus main.py (11.10.2026), Einbindung ueber _app_shell_css(). */
/* ===== PHASE-2 MOBILE ===== */
body { overflow-x: hidden; }

/* hide desktop-only elements on mobile screens */
@media screen and (max-width: 700px) {
    .desktop-only { display: none !important; }
}

/* Mobile: larger, vertical station buttons */
@media screen and (max-width: 700px) {
    .station-button {
        padding: 15px 18px !important;
        border-radius: 13px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
    .station-button.active {
        background: var(--accent-200) !important;
        border-color: var(--accent-600) !important;
        color: var(--accent-800) !important;
        box-shadow: 0 4px 12px rgba(121,108,191,.18) !important;
    }
}

/* === Inline "Weitere Pegel" expand button === */
.pg-more {
    background: transparent !important;
    border: 1.5px dashed var(--accent-600) !important;
    color: var(--accent-600) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}
.pg-more.open {
    border-style: solid !important;
    background: var(--neutral-200) !important;
}
.chev { transition: transform .22s ease; font-size: 12px; line-height: 1; }
/* ── Favorites / Stars ── */
.fav-star {
    font-size: 13px; line-height: 1; cursor: pointer;
    padding: 3px 2px 3px 4px; border-radius: 4px;
    color: var(--neutral-600); opacity: 0.3; flex-shrink: 0;
    transition: opacity .15s, color .15s;
    user-select: none; -webkit-user-select: none;
}
.fav-star.active { color: var(--accent-600); opacity: 1; }
.fav-star:hover { opacity: 0.8; }
.station-button { display: inline-flex; align-items: center; }
.station-button.fav-hidden { display: none !important; }
.btn-label { flex: 1; }
.more-item-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.fav-reset-btn {
    background: none; border: 1.5px dashed #b02a37;
    color: #b02a37; border-radius: 10px;
    padding: 6px 14px; font-size: 13px;
    cursor: pointer; white-space: nowrap; font-family: inherit;
}
.pg-more.open .chev { transform: rotate(180deg); }

/* === Expand panel === */
.more-panel {
    display: none;
    flex-direction: column;
    gap: 8px;
    background: var(--neutral-100);
    border: 1.5px solid var(--neutral-300);
    border-radius: 13px;
    padding: 10px;
    margin-top: 2px;
}
.more-panel.open { display: flex; }
.more-search {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--neutral-300);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    color: var(--neutral-900);
}
.more-search:focus { border-color: var(--accent-600); }
.more-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.more-item {
    width: 100%;
    min-height: 44px;
    flex-shrink: 0; /* Flex-Column staucht Kinder sonst bei vollem Scrollbereich -- Texte ueberlagern */
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--neutral-100);
    border: 1px solid var(--neutral-300);
    font-weight: 600;
    font-size: 15px;
    color: var(--neutral-700);
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.more-item:hover, .more-item:active { background: var(--neutral-300); }
.more-region { font-size: 12px; color: var(--neutral-600); font-weight: 500; }
.more-empty { padding: 14px; text-align: center; color: var(--neutral-600); font-size: 14px; }

/* === Mobile hero card === */
.mobile-hero {
    background: var(--neutral-200);
    color: var(--neutral-900); border-radius: 18px;
    padding: 18px 20px; margin: 10px 0 14px;
    box-shadow: 0 6px 18px rgba(41,43,49,.08);
}
@media screen and (min-width: 701px) { .mobile-hero { display: none; } }
.mobile-hero-eyebrow {
    font-size: 11px; text-transform: uppercase;
    letter-spacing: .08em; color: var(--accent-600); font-weight: 600; margin-bottom: 4px;
}
.mobile-hero-state {
    font-size: 22px; font-weight: 800; line-height: 1.1; margin-bottom: 8px;
}
.mobile-hero-countdown { font-size: 13px; color: var(--neutral-700); margin-bottom: 14px; }
.mobile-hero-pair { display: flex; gap: 10px; }
.mnp {
    flex: 1; background: var(--neutral-100);
    border: 1px solid var(--neutral-300);
    border-radius: 11px; padding: 10px 12px;
}
.mnp-label {
    font-size: 11px; color: var(--neutral-600);
    text-transform: uppercase; letter-spacing: .04em;
}
.mnp-time { font-size: 20px; font-weight: 700; margin-top: 2px; color: var(--neutral-900); }

/* === Mobile section heading === */
.mobile-section-head {
    font-size: 18px; font-weight: 800; color: var(--neutral-900); margin: 14px 0 10px;
}
@media screen and (min-width: 701px) { .mobile-section-head { display: none; } }

/* === Segmented control === */
.segmented-control {
    position: relative; display: flex; margin: 0 0 12px;
    background: var(--neutral-200); border-radius: 12px; padding: 4px;
}
@media screen and (min-width: 701px) { .segmented-control { display: none; } }
.seg-thumb {
    position: absolute; top: 4px; left: 4px;
    width: calc(50% - 4px); height: calc(100% - 8px);
    background: var(--neutral-100); border-radius: 9px;
    box-shadow: 0 2px 6px rgba(41,43,49,.12);
    transition: transform .22s cubic-bezier(.4,0,.2,1);
}
.seg-thumb.right { transform: translateX(100%); }
.seg-btn {
    position: relative; z-index: 1; flex: 1; border: 0;
    background: transparent; font-size: 15px; font-weight: 700;
    color: var(--neutral-600); padding: 9px 0; cursor: pointer; font-family: inherit;
}
.seg-btn.active { color: var(--accent-700); }

/* === W6: mobiler 3/7/14-Tage-Umschalter ===
   Nutzt dieselben .ws-range-btn-Elemente (Klasse + data-range)
   wie der Desktop-Umschalter, damit switchDskRange() beide
   Leisten gemeinsam bedient -- hier nur eigenes Pillen-Layout
   im Pegellatte-Look der bestehenden Segmentleiste. */
.mobile-range-toggle {
    display: flex; margin: 0 0 12px; gap: 2px;
    background: var(--neutral-200); border-radius: 12px; padding: 4px;
}
@media screen and (min-width: 701px) { .mobile-range-toggle { display: none; } }
.mobile-range-toggle .ws-range-btn {
    flex: 1; border: 0; border-radius: 9px;
    background: transparent; font-size: 14px; font-weight: 700;
    color: var(--neutral-600); padding: 8px 0; cursor: pointer; font-family: inherit;
}
.mobile-range-toggle .ws-range-btn.active {
    background: var(--neutral-100); color: var(--accent-700);
    box-shadow: 0 2px 6px rgba(41,43,49,.12);
}

/* === Mobile day cards === */
.mobile-day-cards { margin-bottom: 8px; }
@media screen and (min-width: 701px) { .mobile-day-cards { display: none; } }
.mobile-day-card {
    background: var(--neutral-200); border-radius: 14px; margin-bottom: 10px;
    border: 1px solid var(--neutral-300); overflow: hidden;
    box-shadow: 0 2px 8px rgba(41,43,49,.05);
}
.mobile-day-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 11px 15px; background: var(--neutral-100);
    border-bottom: 1px solid var(--neutral-300);
}
.mobile-day-label { font-weight: 800; font-size: 15px; color: var(--neutral-900); }
.day-today-badge {
    font-size: 12px; color: var(--accent-700); font-weight: 700;
    background: var(--neutral-100); border: 1px solid var(--neutral-300);
    padding: 2px 9px; border-radius: 7px;
}
.mobile-tides-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 1px; background: var(--neutral-300);
}
.tide-item {
    background: var(--neutral-200); padding: 11px 13px;
    display: flex; align-items: flex-start; gap: 10px;
}
.tide-dot {
    width: 9px; height: 9px; border-radius: 50%;
    flex-shrink: 0; margin-top: 15px;
}
.tide-dot.hw { background: var(--neutral-700); }
.tide-dot.nw { background: var(--accent-600); }
.tide-info { min-width: 0; flex: 1; }
.tide-kind {
    font-size: 10px; font-weight: 700;
    letter-spacing: .05em; text-transform: uppercase;
    color: var(--neutral-600); margin-bottom: 1px;
}
.tide-time-row {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.tide-time { font-size: 17px; font-weight: 800; line-height: 1.1; color: var(--neutral-900); }
.tide-waves { display: flex; flex-direction: column; gap: 1px; }
.tide-waves.hw { color: var(--neutral-700); }
.tide-waves.nw { color: var(--accent-600); }
.tide-meta { font-size: 11px; color: var(--neutral-600); margin-top: 2px; }
.badge-voraus {
    display: inline-block; font-size: 10px; color: var(--accent-700);
    font-weight: 700; background: var(--accent-200);
    padding: 1px 6px; border-radius: 5px; margin-top: 3px;
}
.extra-pegel-banner {
    background: var(--neutral-200); color: var(--neutral-900); border-radius: 14px;
    padding: 14px 16px; margin-bottom: 10px; font-size: 13px;
    border: 1px solid var(--neutral-300);
}
.extra-pegel-banner strong { display: block; font-size: 15px; margin-bottom: 3px; }

/* === Desktop Tile View === */
.view-toggle-bar { display: flex; gap: 0; margin-bottom: 14px; }
.vtbtn {
    padding: 7px 16px; font-size: 13px; font-weight: 600;
    background: transparent; border: 1.5px solid var(--neutral-300);
    cursor: pointer; color: var(--neutral-700);
    transition: background .15s, color .15s;
}
.vtbtn:first-child { border-radius: 8px 0 0 8px; }
.vtbtn:last-child { border-radius: 0 8px 8px 0; border-left: none; }
.vtbtn.active { background: transparent; color: var(--accent-700); border-color: var(--accent-600); }
.vtbtn:hover:not(.active) { background: var(--neutral-200); color: var(--neutral-900); }

.desktop-tile-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}
.dtile {
    background: white;
    border: 1.5px solid #d8e1e8;
    border-radius: 12px;
    padding: 12px 10px;
    min-width: 0;
}
.dtile.today {
    border-color: #1e3a5f;
    box-shadow: 0 0 0 3px rgba(30,58,95,0.08);
}
.dtile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eaf2fb;
}
.dtile-day { font-weight: 700; font-size: 13px; color: #1f2d3d; }
.tile-today {
    background: #1e3a5f; color: white;
    font-size: 9px; font-weight: 700;
    padding: 2px 7px; border-radius: 99px;
    letter-spacing: .03em; text-transform: uppercase;
}
.dtile-tide { padding: 6px 0; border-bottom: 1px solid #eaf2fb; }
.dtile-tide:last-child { border-bottom: none; }
.dtile-type {
    font-size: 9px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    display: block; margin-bottom: 2px;
}
.dtile-type.hw { color: #1e3a5f; }
.dtile-type.nw { color: #0f766e; }
.dtile-time-row {
    display: flex; align-items: center;
    justify-content: space-between; gap: 4px;
}
.dtile-time { font-size: 16px; font-weight: 700; color: #1f2d3d; line-height: 1; }
.dtile-waves { display: flex; flex-direction: column; align-items: center; gap: 1px; opacity: 0.6; }
.dtile-waves.hw { color: var(--neutral-700); }
.dtile-waves.nw { color: var(--accent-600); }
.dtile-meta { font-size: 11px; color: var(--neutral-600); margin-top: 3px; }
.tile-badge-voraus {
    display: inline-block; background: var(--accent-200); color: var(--accent-700);
    font-size: 9px; font-weight: 700; padding: 1px 5px;
    border-radius: 4px; text-transform: uppercase; letter-spacing: .03em;
}

/* === Desktop Hero Cards === */
.dsk-hero {
    background: white;
    border: 1px solid #d8e1e8;
    border-radius: 16px;
    padding: 20px 24px 18px;
    margin-bottom: 20px;
}
.dsk-hero-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eaf2fb;
}
.dsk-hero-title {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.dsk-hero-station {
    font-size: 20px;
    font-weight: 800;
    color: #1f2d3d;
    letter-spacing: .02em;
}
.dsk-hero-meta {
    font-size: 12px;
    color: #6b7280;
}
.dsk-hero-logo {
    height: 36px;
    opacity: 0.8;
}
.dsk-hero-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.dsk-card {
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}
.dsk-card-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #6b7280;
}
.dsk-card-status {
    background: #1e3a5f;
}
.dsk-card-status .dsk-card-label { color: rgba(255,255,255,.6); }
.dsk-card-status .dsk-card-big { color: white; font-size: 17px; }
.dsk-card-waves {
    display: flex;
    color: rgba(255,255,255,.65);
    margin: 3px 0;
}
.dsk-card-big {
    font-size: 18px;
    font-weight: 700;
    color: #1f2d3d;
    line-height: 1.25;
}
.dsk-card-countdown { font-variant-numeric: tabular-nums; }
.dsk-card-cd {
    background: #eef6ff;
    border: 1.5px solid #bfdbfe;
}
.dsk-card-cd .dsk-card-label { color: #3b82f6; }
.dsk-card-hw {
    background: white;
    border: 1.5px solid #d8e1e8;
    border-left: 4px solid #1e3a5f;
}
.dsk-card-hw .dsk-card-label { color: #1e3a5f; }
.dsk-card-nw {
    background: white;
    border: 1.5px solid #d8e1e8;
    border-left: 4px solid #0f766e;
}
.dsk-card-nw .dsk-card-label { color: #0f766e; }
.dsk-card-time {
    font-size: 30px;
    font-weight: 800;
    color: #1f2d3d;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.dsk-card-height {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.dsk-card-sub {
    font-size: 11px;
    color: #6b7280;
}

/* === Print overrides === */
@media print {
    .mobile-hero, .mobile-day-cards, .mobile-section-head,
    .segmented-control, .more-panel, .extra-pegel-banner,
    .view-toggle-bar, .desktop-tile-grid { display: none !important; }
    .desktop-only { display: block !important; }
    .pg-more { display: none !important; }
}
