/* ═══════════════════════════════════════════════════
   DRIVING TEST TRACKER — Frontend Map Styles  v2.0
   ═══════════════════════════════════════════════════ */

/* ── Wrapper ─────────────────────────────────────── */
#dtt-map-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.12);
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
}

#dtt-map {
    width: 100%;
    min-height: 480px;
    background: #e8ecf0;
}

/* ── Legend ──────────────────────────────────────── */
#dtt-map-legend {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #1d1d1f;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 14px;
}

.dtt-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dtt-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    flex-shrink: 0;
}
.dtt-dot-green { background: #34c759; border: 1.5px solid #25a244; }
.dtt-dot-red   { background: #ff3b30; border: 1.5px solid #cc2f26; }

/* ── Popup wrapper ───────────────────────────────── */
.dtt-popup .leaflet-popup-content-wrapper {
    border-radius: 14px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.16) !important;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
}
.dtt-popup .leaflet-popup-tip-container { margin-top: -1px; }
.dtt-popup .leaflet-popup-content {
    margin: 0 !important;
    min-width: 220px;
    max-width: 280px;
}

/* ── Popup inner ─────────────────────────────────── */
.dtt-popup-inner {
    padding: 14px 16px 12px;
}

.dtt-popup-name {
    font-weight: 700;
    font-size: 14px;
    color: #1d1d1f;
    margin-bottom: 4px;
    line-height: 1.3;
}

.dtt-popup-region {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #5e5ce6;
    background: #f2f2f7;
    display: inline-block;
    padding: 2px 7px;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* ── Checklist ───────────────────────────────────── */
.dtt-popup-status {
    font-size: 12px;
    color: #3a3a3c;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}
.dtt-check-item {
    display: flex;
    align-items: center;
    gap: 7px;
    line-height: 1.4;
}
.dtt-check-icon { font-size: 11px; flex-shrink: 0; }

/* ── Address block ───────────────────────────────── */
.dtt-popup-address {
    background: #f5f5f7;
    border: 1px solid #e5e5ea;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.dtt-addr-text {
    font-size: 11.5px;
    color: #3a3a3c;
    line-height: 1.5;
    flex: 1;
    word-break: break-word;
}

.dtt-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    border: 1px solid #d1d1d6;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    color: #3a3a3c;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    line-height: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
}
.dtt-copy-btn:hover {
    background: #f0f0f5;
    border-color: #b0b0bb;
}
.dtt-copy-btn.dtt-copy-success {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #065f46;
}
.dtt-copy-btn svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    color: #8e8e93;
}
.dtt-copy-btn.dtt-copy-success svg { color: #065f46; }

/* ── Google Maps link ────────────────────────────── */
.dtt-gmaps-link {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #eaf4ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #1d6fb8;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    margin-bottom: 0;
    line-height: 1;
}
.dtt-gmaps-link:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1558a0;
    text-decoration: none;
}
.dtt-gmaps-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #1d6fb8;
}

/* ── Footer ──────────────────────────────────────── */
.dtt-popup-footer {
    background: #f5f5f7;
    padding: 8px 16px;
    font-size: 11.5px;
    font-weight: 500;
    color: #86868b;
    border-top: 1px solid #e5e5ea;
    line-height: 1.4;
}
.dtt-popup-footer.done {
    background: #d1fae5;
    color: #065f46;
    font-weight: 700;
}
