/* MAQTOU map cards — modern UI */

.map-card {
    padding: 12px;
    background: #202126;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0,0,0,0.22);
}

.map-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.map-card-head h3 {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0;
    color: #fff;
}

.map-card-subtitle {
    display: block;
    margin-top: 3px;
    color: #9aa0a6;
    font-size: 0.78rem;
    font-weight: 500;
}

.map-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    border: 1px solid rgba(34, 197, 94, 0.25);
}
.map-live-dot {
    width: 7px; height: 7px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
    animation: map-live-pulse 1.6s ease-in-out infinite;
}
@keyframes map-live-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
    50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.map-frame {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #17191f;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
    aspect-ratio: 16 / 9;
    min-height: 280px;
}
.map-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,0.16), transparent 28%, transparent 70%, rgba(0,0,0,0.18));
    z-index: 2;
}
.map-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Loading placeholder while Google Maps boots */
.map-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #9aa0a6;
    font-size: 0.85rem;
    background: #17191f;
    z-index: 1;
    transition: opacity .3s ease;
}
.map-card.map-ready .map-loading {
    opacity: 0;
    pointer-events: none;
}
.map-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgba(255, 92, 0, 0.18);
    border-top-color: #FF5C00;
    animation: map-spin 0.8s linear infinite;
}
@keyframes map-spin { to { transform: rotate(360deg); } }

.map-actions {
    margin-top: 14px;
}

.map-overlay-chip {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 12px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(23, 25, 31, 0.88);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: #fff;
    backdrop-filter: blur(10px);
}
.map-overlay-chip strong { font-size: 0.85rem; }
.map-overlay-chip span { color: #a8adb7; font-size: 0.78rem; }

.map-fallback {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    color: #a8adb7;
    text-align: center;
    background: #17191f;
}
.map-fallback strong { color: #fff; }
.map-fallback-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 92, 0, 0.15);
    border: 1px solid rgba(255, 92, 0, 0.3);
    color: #FF5C00;
    font-weight: 800;
    font-size: 1.4rem;
}

/* Subtle inner border for the live tile area */
.gm-style { border-radius: 8px; }
.gm-style > div:first-child { border-radius: 8px; }

/* Mute Google's stock UI controls visually to match dark theme */
.map-frame .gm-style-mtc,
.map-frame .gm-fullscreen-control,
.map-frame .gm-svpc { display: none !important; }

@media (max-width: 600px) {
    .map-card { padding: 10px; }
    .map-frame { min-height: 240px; aspect-ratio: 4 / 3; }
    .map-overlay-chip { left: 10px; right: 10px; top: 10px; align-items: flex-start; flex-direction: column; gap: 2px; }
}
