/* Savanna Fibre Coverage Checker — coverage-checker.css */

:root {
    --sf-orange: #F5891A;
    --sf-orange-dark: #d9730d;
    --sf-orange-light: #fff4ea;
}

#savanna-coverage-app * {
    box-sizing: border-box;
}

.sf-wrapper {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .1);
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0 auto;
}

/* ── Header ─────────────────────────────── */
.sf-header {
    background: linear-gradient(135deg, #F5891A 0%, #e07010 100%);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sf-header-text h1 {
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    letter-spacing: -.2px;
}
.sf-header-text p {
    font-size: 12px;
    color: rgba(255, 255, 255, .85);
    margin: 0;
    margin-top: 2px;
}
.sf-logo-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}
.btn-reset {
    background: rgba(255, 255, 255, .95);
    color: var(--sf-orange-dark);
    border: none;
    border-radius: 8px;
    padding: 7px 15px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.btn-reset:hover { background: #fff; transform: translateY(-1px); }

/* ── Search bar ─────────────────────────── */
.sf-search {
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, .07);
}
.search-input-group { display: flex; gap: 8px; }
.search-wrap { flex: 1; position: relative; }
.search-wrap input {
    width: 100%;
    padding: 11px 44px 11px 40px;
    border: 1.5px solid rgba(0, 0, 0, .12);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    background: #fff;
    color: #1a1a1a;
    transition: border-color .2s, box-shadow .2s;
}
.search-wrap input:focus {
    border-color: var(--sf-orange);
    box-shadow: 0 0 0 3px rgba(245, 137, 26, .12);
}
.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #999;
    pointer-events: none;
}
.gps-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    opacity: .5;
    transition: opacity .2s;
}
.gps-icon:hover { opacity: 1; }

.btn-check {
    background: var(--sf-orange);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
}
.btn-check:hover { background: var(--sf-orange-dark); transform: translateY(-1px); }

.hint-row { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.hint-label { font-size: 12px; color: #888; }
.hint-chip {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 3px 9px;
    font-size: 11.5px;
    cursor: pointer;
    color: #444;
    transition: all .15s;
}
.hint-chip:hover {
    background: var(--sf-orange-light);
    border-color: var(--sf-orange);
    color: var(--sf-orange-dark);
}

/* ── Map + Panel ────────────────────────── */
.sf-body { display: flex; min-height: 500px; }

#sf-map {
    flex: 1;
    min-height: 490px;
    z-index: 1;
}

.sf-panel {
    width: 320px;
    min-width: 300px;
    background: #fff;
    border-left: 1px solid rgba(0, 0, 0, .07);
    display: flex;
    flex-direction: column;
    max-height: 490px;
    overflow: hidden;
}
.panel-top { padding: 14px 16px 0; flex-shrink: 0; }
.panel-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.panel-title { font-size: 14px; font-weight: 600; color: #1a1a1a; }

.status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: .3px;
}
.badge-wait { background: #f0f0f0; color: #888; }
.badge-ok   { background: #dcfce7; color: #15803d; }
.badge-no   { background: #fee2e2; color: #b91c1c; }

.panel-scroll { flex: 1; overflow-y: auto; padding: 0 16px 16px; }

.panel-footer {
    padding: 8px 16px 10px;
    border-top: 1px solid rgba(0, 0, 0, .07);
    flex-shrink: 0;
}
.panel-footer-text {
    font-size: 11px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ── Panel content ──────────────────────── */
.wait-empty { text-align: center; padding: 32px 16px; }
.wait-empty .empty-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}
.wait-empty p { font-size: 13px; color: #888; margin: 0; line-height: 1.5; }

.result-anim { animation: sfSlideUp .3s ease-out; }
@keyframes sfSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.coords-pill {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 11.5px;
    color: #666;
    font-family: monospace;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.result-card { border-radius: 12px; padding: 18px; text-align: center; margin-bottom: 12px; }
.result-card.ok { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border: 1px solid #bbf7d0; }
.result-card.no { background: linear-gradient(135deg, #fff1f2, #fee2e2); border: 1px solid #fecaca; }

.result-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}
.result-icon-circle.ok { background: #22c55e; }
.result-icon-circle.no { background: #ef4444; }

.result-title { font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.result-title.ok { color: #15803d; }
.result-title.no { color: #b91c1c; }
.result-sub { font-size: 12px; margin: 4px 0 0; opacity: .85; }
.result-sub.ok { color: #15803d; }
.result-sub.no { color: #b91c1c; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.info-tile { background: #f9f9f9; border-radius: 10px; padding: 10px 12px; }
.info-tile.full { grid-column: 1 / -1; }
.tile-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #888;
    margin-bottom: 3px;
}
.tile-value { font-size: 13px; font-weight: 600; color: var(--sf-orange); word-break: break-all; }

/* ── Packages ───────────────────────────── */
.pkg-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #888;
    border-top: 1px solid rgba(0, 0, 0, .07);
    padding-top: 12px;
    margin-bottom: 8px;
}
.pkg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 12px; }
.pkg-card {
    border: 1.5px solid rgba(0, 0, 0, .1);
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: all .2s;
    background: #fff;
    position: relative;
    overflow: hidden;
}
.pkg-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: transparent;
    transition: background .2s;
}
.pkg-card:hover { border-color: var(--sf-orange); transform: translateY(-1px); }
.pkg-card.selected { border-color: var(--sf-orange); background: var(--sf-orange-light); }
.pkg-card.selected::before { background: var(--sf-orange); }

.pkg-animal  { font-size: 18px; margin-bottom: 4px; }
.pkg-name    { font-size: 12px; font-weight: 700; color: #1a1a1a; }
.pkg-speed   { font-size: 11px; color: #888; margin-top: 1px; }
.pkg-price   { font-size: 12px; font-weight: 700; color: var(--sf-orange); margin-top: 5px; }
.popular-badge {
    position: absolute;
    top: 5px; right: 5px;
    background: var(--sf-orange);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 20px;
    letter-spacing: .3px;
}

/* ── Action buttons ─────────────────────── */
.action-btns { display: flex; gap: 7px; margin-bottom: 8px; }
.btn-copy-sf {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px;
    border: 1.5px solid rgba(0, 0, 0, .12);
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    color: #1a1a1a;
    transition: all .2s;
}
.btn-copy-sf:hover { border-color: var(--sf-orange); color: var(--sf-orange); }

.btn-wa-sf {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
}
.btn-wa-sf:hover { background: #1db954; transform: translateY(-1px); }

.btn-expand {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    margin-top: 8px;
}
.btn-expand:hover { background: #1db954; }

/* ── Footer bar ─────────────────────────── */
.sf-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 18px;
    background: #f9f9f9;
    border-top: 1px solid rgba(0, 0, 0, .07);
    flex-wrap: wrap;
    gap: 8px;
}
.tip-text { font-size: 11.5px; color: #888; }
.kmz-area { display: flex; align-items: center; gap: 8px; }
.kmz-btn-lbl {
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 6px;
    cursor: pointer;
    background: #fff;
    color: #333;
    transition: all .2s;
}
.kmz-btn-lbl:hover { border-color: var(--sf-orange); color: var(--sf-orange); }
#sf-kmz-status { font-size: 11px; color: #15803d; font-weight: 500; }

/* ── Responsive ─────────────────────────── */
@media (max-width: 680px) {
    .sf-body { flex-direction: column; }
    #sf-map { min-height: 300px; }
    .sf-panel { width: 100%; max-height: none; border-left: none; border-top: 1px solid rgba(0,0,0,.07); }
    .sf-bottom { flex-direction: column; align-items: flex-start; }
    .sf-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}
