/* ═══════════════════════════════════════════════════════════
   OKCurbs Flyer Tracker — Styles
═══════════════════════════════════════════════════════════ */

#flyer-main {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

/* ── Views ───────────────────────────────────────────────── */
.flyer-view { display: none; }
.flyer-view.active { display: block; }

.flyer-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}
.flyer-view-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-light);
    flex: 1;
}

/* ── Login card ──────────────────────────────────────────── */
#flyer-login-card {
    max-width: 400px;
    margin: 0 auto;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
}
#flyer-login-card .login-icon { font-size: 40px; margin-bottom: 12px; }
#flyer-login-card h2 { font-size: 20px; font-weight: 800; margin-bottom: 6px; }
#flyer-login-card p  { font-size: 13px; color: var(--text-dim); margin-bottom: 20px; }

/* ── Me chip in header ───────────────────────────────────── */
.me-chip {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: default;
}
.me-chip button {
    background: rgba(0,0,0,0.2);
    border: none;
    color: inherit;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    cursor: pointer;
}

/* ── Route list ──────────────────────────────────────────── */
.route-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
}
.route-card-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-light);
}
.route-card-meta {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 2px;
}
.route-card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.btn-danger {
    background: transparent;
    border: 1px solid #7b0000;
    color: #ef4444;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}
.btn-danger:hover { background: rgba(239,68,68,0.1); }

/* ── Setup map ───────────────────────────────────────────── */
.setup-map-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 16px;
    margin-bottom: 4px;
}
#setup-map {
    height: 380px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    position: relative;
}
#setup-addr-preview {
    background: var(--bg-panel2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-light);
}
@media (max-width: 640px) {
    .setup-map-layout { grid-template-columns: 1fr; }
    #setup-map { height: 280px; }
}

/* ── Canvass view (full-screen, sits below the site header) ── */
#view-canvass {
    position: fixed;
    inset: 0;
    top: 65px; /* below booking-header (18px pad + 28px logo + 18px pad + 1px border) */
    display: none;
    flex-direction: column;
    background: #0d0d0d;
    z-index: 100;
}
#view-canvass.active { display: flex; }

#canvass-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    min-height: 52px;
}
.canvass-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-light);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.canvass-stats {
    font-size: 12px;
    color: var(--neon-green);
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

#canvass-map {
    flex: 1;
    min-height: 0;
}

#canvass-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 14px;
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    flex-wrap: wrap;
    min-height: 40px;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light);
}
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.4);
    flex-shrink: 0;
}
.legend-unclaimed {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-dim);
}
.legend-dot-unclaimed {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #444;
    border: 2px solid #666;
    flex-shrink: 0;
}

/* ── Address pin markers ─────────────────────────────────── */
.flyer-pin {
    position: relative;
    display: inline-block;
    transform: translate(-50%, -50%);
    background: rgba(15,15,15,0.92);
    border: 2px solid rgba(255,255,255,0.45);
    border-radius: 5px;
    padding: 3px 7px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.7);
    cursor: pointer;
    user-select: none;
    min-width: 28px;
    text-align: center;
    line-height: 1.4;
    transition: transform 0.1s, box-shadow 0.1s;
}
.flyer-pin:hover {
    transform: translate(-50%, -50%) scale(1.12);
    box-shadow: 0 3px 12px rgba(0,0,0,0.8);
}
.flyer-pin-badge {
    position: absolute;
    top: -9px;
    right: -9px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f0ff20;
    color: #000;
    font-size: 9px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(0,0,0,0.5);
    pointer-events: none;
}

/* ── Status form overlay ─────────────────────────────────── */
.status-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 500;
    align-items: flex-end;  /* slide up from bottom on mobile */
    justify-content: center;
    padding: 0 0 env(safe-area-inset-bottom);
}
.status-form {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    padding: 20px 20px 28px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 -4px 32px rgba(0,0,0,0.5);
}
.status-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.status-form-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-light);
}
.status-form-close {
    background: var(--bg-panel2);
    border: 1px solid var(--border);
    color: var(--text-dim);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* ── Status button grid ──────────────────────────────────── */
.sf-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
}
.sf-status-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 8px;
    background: var(--bg-panel2);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s;
    font-family: inherit;
    text-align: center;
    line-height: 1.2;
}
.sf-status-btn:active { transform: scale(0.97); }
.sf-status-btn.active {
    border-color: var(--s-color);
    background: color-mix(in srgb, var(--s-color) 15%, transparent);
    color: var(--s-color);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--s-color) 40%, transparent);
}

.status-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.status-form-actions .btn-primary {
    flex: 1;
}
.btn-schedule-service {
    flex: 1;
    background: transparent;
    border: 1px solid var(--neon-yellow);
    color: var(--neon-yellow);
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
}
.btn-schedule-service:hover { background: rgba(240,255,32,0.08); }

/* ── Misc ────────────────────────────────────────────────── */
.flyer-loading {
    padding: 20px;
    text-align: center;
    color: var(--text-dim);
    font-size: 14px;
}
