/* Generated from css/qibla.css by tools/rtl/gen.js (rtlcss) — do not edit */
/* ═══════════════════════════════════════════
   Qibla Finder — Full-screen map + panel
   Theme variables are now in css/theme.css
   ═══════════════════════════════════════════ */

/* ─── Base ─── */
.qibla-page {
    overflow: hidden;
    height: 100dvh;
    background: #080c18;
    transition: background 0.4s;
}

/* Header/sidebar theme overrides are now in css/theme.css */

/* Hide the shared footer on this page — location is handled inline */
.qibla-page #site-footer {
    display: none !important;
}

/* ─── Mapbox map fills the viewport ─── */
#qibla-map {
    position: fixed;
    inset: 0;
    z-index: 1;
}

/* Token / load error overlay */
.qibla-map-error {
    position: fixed;
    inset: 0;
    z-index: 2;
    background: #080c18;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qibla-map-error-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
    padding: 32px;
    max-width: 320px;
}
.qibla-map-error-inner svg {
    opacity: 0.4;
}
.qibla-map-error-inner p {
    font-size: 14px;
    line-height: 1.6;
}
.qibla-map-error-inner code {
    font-family: monospace;
    font-size: 12px;
    background: rgba(255,255,255,0.07);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Position Mapbox controls so they don't overlap the rail sidebar */
.qibla-page .mapboxgl-ctrl-bottom-right {
    left: 96px;
    bottom: 24px;
}
.qibla-page .mapboxgl-ctrl-bottom-left {
    right: 352px;
    bottom: 24px;
    transition: right 0.3s;
}
.qibla-page .mapboxgl-ctrl-attrib {
    background: rgba(5, 8, 18, 0.6);
    color: rgba(255, 255, 255, 0.35);
    border-radius: 6px;
}
.qibla-page .mapboxgl-ctrl-attrib a {
    color: rgba(255, 255, 255, 0.45);
}

/* ═══════════════════════════════════════════
   CONTROL PANEL
   ═══════════════════════════════════════════ */
.qibla-panel {
    position: fixed;
    top: calc(64px + 14px);       /* below header */
    right: 14px;
    width: 310px;
    z-index: 20;
    background: var(--qb-panel-glass);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid var(--qb-border);
    border-radius: 22px;
    box-shadow: var(--qb-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: calc(100dvh - 64px - 28px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--qb-scroll) transparent;
    transition: background 0.35s, border-color 0.35s, box-shadow 0.35s;
}
.qibla-panel::-webkit-scrollbar { width: 3px; }
.qibla-panel::-webkit-scrollbar-track { background: transparent; }
.qibla-panel::-webkit-scrollbar-thumb { background: var(--qb-scroll); border-radius: 10px; }

/* ─── Panel Header ─── */
.qp-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--qb-border);
    flex-shrink: 0;
    transition: border-color 0.35s;
}

.qp-icon {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--qb-accent);
    flex-shrink: 0;
    transition: color 0.35s;
}

.qp-title-wrap {
    flex: 1;
    min-width: 0;
}
.qp-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--qb-text);
    letter-spacing: 0.2px;
    margin: 0;
    line-height: 1.2;
    transition: color 0.35s;
}
.qp-location-name {
    font-size: 11px;
    color: var(--qb-text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
    margin: 3px 0 0;
    line-height: 1;
    transition: color 0.35s;
}

.qp-close-btn {
    width: 30px;
    height: 30px;
    display: none;         /* visible only on mobile */
    align-items: center;
    justify-content: center;
    background: var(--qb-input-bg);
    border: 1px solid var(--qb-border);
    border-radius: 9px;
    color: var(--qb-text-dim);
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}
.qp-close-btn:hover {
    background: var(--qb-hover);
    color: var(--qb-text);
}

/* ═══════════════════════════════════════════
   COMPASS
   ═══════════════════════════════════════════ */
.qp-compass-section {
    padding: 22px 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.qp-compass {
    position: relative;
    width: 196px;
    height: 196px;
    flex-shrink: 0;
}

/* SVG background dial */
.qp-compass-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    color: var(--qb-text);
}

/* Needle wrapper (full-size overlay, rotates) */
.qp-needle {
    position: absolute;
    inset: 0;
    transition: transform 1.15s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
    pointer-events: none;
}

/* Inner: column layout, centered on pivot point */
.qp-needle-inner {
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 168px;
    width: 30px;
}

/* Head — Kaaba icon, points toward Qibla */
.qp-needle-head {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.14);
    border: 1.5px solid rgba(245, 158, 11, 0.55);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    flex-shrink: 0;
    z-index: 2;
}

/* Shaft — gradient line from tip to tail */
.qp-needle-shaft {
    flex: 1;
    width: 2px;
    background: linear-gradient(
        to bottom,
        rgba(245, 158, 11, 0.75) 0%,
        rgba(245, 158, 11, 0.25) 65%,
        transparent 100%
    );
    border-radius: 1px;
}

/* Tail dot */
.qp-needle-tail {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    flex-shrink: 0;
}

/* Center pivot dot */
.qp-compass-center {
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    border: 2px solid rgba(255, 255, 255, 0.25);
    z-index: 5;
}

/* Label below compass: "N — X° from North" */
.qp-compass-label {
    font-size: 11px;
    color: var(--qb-text-dimmer);
    letter-spacing: 0.3px;
    text-align: center;
    margin: 0;
    transition: color 0.35s;
}

/* ═══════════════════════════════════════════
   BEARING + DISTANCE ROW
   ═══════════════════════════════════════════ */
.qp-info-row {
    display: flex;
    align-items: stretch;
    padding: 0 18px 18px;
    gap: 0;
    flex-shrink: 0;
}

.qp-info-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    text-align: center;
}

.qp-info-divider {
    width: 1px;
    background: var(--qb-border);
    margin: 0 6px;
    align-self: stretch;
    transition: background 0.35s;
}

.qp-info-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--qb-text-dimmer);
    transition: color 0.35s;
}

.qp-info-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--qb-text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    line-height: 1.1;
    transition: color 0.35s;
}

/* ═══════════════════════════════════════════
   SEARCH + LOCATE
   ═══════════════════════════════════════════ */
.qp-search-section {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px 14px;
    flex-shrink: 0;
    border-top: 1px solid var(--qb-border);
    padding-top: 14px;
    transition: border-color 0.35s;
}

.qp-search-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.qp-search-input-wrap {
    display: flex;
    align-items: center;
    background: var(--qb-input-bg);
    border: 1px solid var(--qb-border);
    border-radius: 13px;
    padding: 0 11px 0 8px;
    gap: 9px;
    transition: border-color 0.2s, background 0.2s;
}
.qp-search-input-wrap:focus-within {
    border-color: color-mix(in srgb, var(--qb-accent) 55%, transparent);
    background: var(--qb-hover);
}
.qp-search-input-wrap > svg {
    color: var(--qb-text-dimmer);
    flex-shrink: 0;
}

.qp-search-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--qb-text);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    padding: 10px 0;
    margin: 3px 0;
    outline: none;
    min-width: 0;
    transition: color 0.35s;
}
.qp-search-input::placeholder {
    color: var(--qb-text-dimmer);
}

/* Search results dropdown — fixed above input */
.qp-search-results {
    position: fixed;
    background: var(--qb-panel);
    border: 1px solid var(--qb-border);
    border-radius: 13px;
    z-index: 200;
    box-shadow: var(--qb-shadow);
    max-height: 320px;
    overflow-y: auto;
}
@keyframes qpResultsIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.qp-result {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 13px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--qb-border);
    color: var(--qb-text-dim);
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    text-align: right;
    transition: background 0.15s, color 0.15s;
}
.qp-result:last-child { border-bottom: none; }
.qp-result:hover {
    background: var(--qb-hover);
    color: var(--qb-text);
}
.qp-result svg {
    color: var(--qb-text-dimmer);
    flex-shrink: 0;
}
.qp-result span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* GPS locate button — inline inside the search field */
.qp-locate-inline-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--qb-text-dimmer);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 6px;
    transition: color 0.2s;
}
.qp-locate-inline-btn:hover {
    color: var(--qb-accent);
}
.qp-locate-inline-btn.loading {
    animation: locateSpin 1.2s linear infinite;
    color: var(--qb-accent);
}

/* Kaaba focus button — replace old locate btn */
.qp-kaaba-btn {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: color-mix(in srgb, var(--qb-accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--qb-accent) 22%, transparent);
    color: var(--qb-accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.qp-kaaba-btn:hover {
    background: color-mix(in srgb, var(--qb-accent) 20%, transparent);
    border-color: color-mix(in srgb, var(--qb-accent) 38%, transparent);
}
.qp-kaaba-btn:active {
    transform: scale(0.93);
}
@keyframes locateSpin {
    to { transform: rotate(-360deg); }
}

/* ═══════════════════════════════════════════
   STATUS MESSAGE
   ═══════════════════════════════════════════ */
.qp-status {
    margin: 0 14px 14px;
    padding: 10px 13px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.55;
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
    color: var(--qb-text);
}
.qp-status--loading {
    background: color-mix(in srgb, var(--qb-accent) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--qb-accent) 18%, transparent);
}
.qp-status--error {
    background: rgba(239, 68, 68, 0.07);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: rgba(252, 165, 165, 0.9);
}
.qp-status--info {
    background: var(--qb-input-bg);
    border: 1px solid var(--qb-border);
    color: var(--qb-text-dim);
}

/* ═══════════════════════════════════════════
   MAPBOX — custom layers toggle button (injected into ctrl group)
   ═══════════════════════════════════════════ */
/* ═══════════════════════════════════════════
   LAYER THUMBNAIL — Google Maps style
   ═══════════════════════════════════════════ */
.qibla-layer-thumb {
    position: fixed;
    top: calc(64px + 12px);
    left: 12px;
    width: 65px;
    height: 65px;
    border-radius: 8px;
    overflow: hidden;
    border: 2.5px solid var(--qb-border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    z-index: 10;
    transition: border-color 0.35s, transform 0.18s, box-shadow 0.18s;
}
.qibla-layer-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.48);
}
@media (min-width: 769px) {
    body.sidebar-mini .qibla-layer-thumb {
        left: calc(80px + 12px);
    }
}
#qibla-layer-mini-map {
    width: 100%;
    height: 100%;
    pointer-events: none;
}
/* Disable all Mapbox UI inside thumbnail */
#qibla-layer-mini-map .mapboxgl-ctrl,
#qibla-layer-mini-map .mapboxgl-canvas-container canvas {
    pointer-events: none;
}
.qibla-layer-thumb-label {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    text-align: center;
    font-size: 9px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.52) 0%, transparent 100%);
    padding: 10px 4px 5px;
    pointer-events: none;
}

/* ═══════════════════════════════════════════
   TOPBAR RIGHT — theme switcher position
   ═══════════════════════════════════════════ */
.qibla-topbar-right {
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    display: flex;
    align-items: center;
    transition: left 0.4s cubic-bezier(0.22, 1, 0.36, 1), transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (max-width: 768px) {
    .qibla-topbar-right {
        left: 20px;
    }
}
@media (min-width: 769px) {
    .qibla-page.sidebar-mini .qibla-topbar-right {
        left: 20px;
    }
}

/* Panel popup rises UP (qibla-specific override) */
.qp-theme-row .q-theme-popup {
    position: absolute;
    bottom: calc(100% + 8px);
    top: auto;
    right: 50%;
    transform: translateX(50%);
    animation: qbPanelPopupIn 0.15s ease;
}
@keyframes qbPanelPopupIn {
    from { opacity: 0; transform: translateX(50%) translateY(6px); }
    to   { opacity: 1; transform: translateX(50%) translateY(0); }
}

/* Sidebar z-index — above map but below theme-switcher popup */
.qibla-page #sidebar { z-index: 182; }

/* ═══════════════════════════════════════════
   PANEL THEME ROW
   ═══════════════════════════════════════════ */
.qp-theme-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px 16px;
    flex-shrink: 0;
    border-top: 1px solid var(--qb-border);
    padding-top: 12px;
    transition: border-color 0.35s;
}
.qp-theme-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--qb-text-dimmer);
    transition: color 0.35s;
}

/* ═══════════════════════════════════════════
   MOBILE PANEL TOGGLE BUTTON
   ═══════════════════════════════════════════ */
.qp-panel-toggle {
    display: none;
    position: fixed;
    bottom: 28px;
    right: 50%;
    transform: translateX(50%);
    z-index: 25;
    padding: 13px 26px;
    background: rgba(16, 185, 129, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: none;
    border-radius: 100px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.4px;
    cursor: pointer;
    gap: 7px;
    align-items: center;
    box-shadow: 0 5px 22px rgba(16, 185, 129, 0.38);
    transition: background 0.2s, transform 0.2s;
}
.qp-panel-toggle:hover {
    background: rgba(16, 185, 129, 1);
    transform: translateX(50%) scale(1.03);
}

/* ─── Mobile Backdrop ─── */
.qp-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 18;
}
.qp-backdrop.hidden { display: none; }

/* ═══════════════════════════════════════════
   KAABA MAP MARKER
   ═══════════════════════════════════════════ */
.qibla-kaaba-pin {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}
.kaaba-pin-icon {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
    transition: transform 0.2s;
}
.qibla-kaaba-pin:hover .kaaba-pin-icon {
    transform: scale(1.1);
}
/* Pulse ring behind the icon */
.kaaba-pulse {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(62, 141, 208, 0.2);
    box-shadow: 0 0 0 0 rgba(62, 141, 208, 0.5);
    animation: kaabaPulse 2s ease-out infinite;
    pointer-events: none;
}
@keyframes kaabaPulse {
    0%   { transform: scale(0.9); box-shadow: 0 0 0 0    rgba(62, 141, 208, 0.55); }
    60%  { transform: scale(1.1); box-shadow: 0 0 0 18px rgba(62, 141, 208, 0);    }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0    rgba(62, 141, 208, 0);    }
}

/* ═══════════════════════════════════════════
   DRAGGABLE USER LOCATION MARKER
   ═══════════════════════════════════════════ */

.qibla-user-pin {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    /* Force draggable cursor on the whole element */
    touch-action: none;
}
.qibla-user-pin:active {
    cursor: grabbing;
}

/* Pulsing ring */
.qibla-user-pin-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(56, 189, 248, 0.42);
    animation: userPinPulse 2.2s ease-out infinite;
}
@keyframes userPinPulse {
    0%   { transform: scale(0.7); opacity: 0.9; }
    100% { transform: scale(1.9); opacity: 0; }
}

/* Arrow pointing toward Qibla — rotated wrapper orbits the dot */
.qibla-user-pin-arrow-wrap {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.qibla-user-pin-arrow {
    position: absolute;
    right: 50%;
    top: -16px;
    transform: translateX(50%);
    width: 0;
    height: 0;
    border-right:  7px solid transparent;
    border-left: 7px solid transparent;
    border-bottom: 11px solid #3e8dd0;
    filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.5));
}

/* Inner dot */
.qibla-user-pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #38bdf8;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
    position: relative;
    z-index: 1;
    transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.18s ease;
}

/* Lift effect while dragging */
.qibla-user-pin:active .qibla-user-pin-dot,
.mapboxgl-marker.dragging .qibla-user-pin-dot {
    transform: scale(1.25);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}

/* ─── Utility ─── */
.hidden { display: none !important; }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

/* Tablet: slightly narrower panel */
@media (max-width: 900px) {
    .qibla-panel {
        width: 290px;
    }
    .qibla-page .mapboxgl-ctrl-bottom-left {
        right: 320px;
    }
}

/* Mobile: panel becomes a bottom sheet */
@media (max-width: 640px) {
    .qibla-panel {
        top: auto;
        right: 0;
        left: 0;
        bottom: 0;
        width: 100%;
        border-radius: 22px 22px 0 0;
        max-height: 78dvh;
        transform: translateY(100%);
        transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .qibla-panel.panel-open {
        transform: translateY(0);
    }

    .qp-close-btn {
        display: flex;
    }
    .qp-panel-toggle {
        display: flex;
    }

    /* Smaller compass on mobile */
    .qp-compass {
        width: 168px;
        height: 168px;
    }
    .qp-needle-inner {
        height: 144px;
    }

    /* Map controls: mobile resets */
    .qibla-page .mapboxgl-ctrl-bottom-right {
        left: 14px;
        bottom: 14px;
    }
    .qibla-page .mapboxgl-ctrl-bottom-left {
        right: 14px;
        bottom: 14px;
    }
}

/* Desktop: lock panel visible, remove mobile sheet behaviour */
@media (min-width: 641px) {
    .qibla-panel {
        transform: none !important;
        transition: none;
    }
    .qp-panel-toggle {
        display: none !important;
    }
    .qp-backdrop {
        display: none !important;
    }
}

/* ── Mosques on the map (js/qibla.js addMosques) ── */
.pt-mq-ic { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #0f8f63 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 40' fill='%23fff'%3E%3Cpath d='M24 4.5c.6 1.6 1.8 2.9 3.3 3.7a6.6 6.6 0 0 1 3.5 5.9H17.2a6.6 6.6 0 0 1 3.5-5.9c1.5-.8 2.7-2.1 3.3-3.7z'/%3E%3Crect x='16.5' y='15.2' width='15' height='11.8' rx='1'/%3E%3Crect x='10.4' y='8.6' width='3.2' height='18.4' rx='1'/%3E%3Cpath d='M12 4.2l1.8 3.4h-3.6z'/%3E%3Crect x='34.4' y='8.6' width='3.2' height='18.4' rx='1'/%3E%3Cpath d='M36 4.2l1.8 3.4h-3.6z'/%3E%3C/svg%3E") center 55% / 70% no-repeat; }
.pt-mq-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-mq-near { flex: none; padding: 7px 13px; border: 0; border-radius: 999px; background: #0f8f63; color: #fff; font: 700 12.5px 'Inter', sans-serif; cursor: pointer; transition: background .2s; }
.pt-mq-near:hover { background: #0b7a55; }
.pt-mq-popup .mapboxgl-popup-content { padding: 12px 14px 12px 30px; border-radius: 14px; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .45); font-family: 'Inter', sans-serif; }
.pt-mq-popup .mapboxgl-popup-close-button { top: 6px; left: 6px; right: auto; font-size: 18px; color: #6b7280; }
.pt-mq-pop { display: flex; flex-direction: column; gap: 3px; color: #1f2937; }
.pt-mq-k { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #0f8f63; }
.pt-mq-pop b { font-size: 14.5px; line-height: 1.3; }
.pt-mq-d { font-size: 12.5px; color: #6b7280; }
.pt-mq-go { margin-top: 6px; align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: #0f8f63; color: #fff !important; font-size: 12px; font-weight: 700; text-decoration: none; }
.pt-mq-go:hover { background: #0b7a55; }
.pt-mq-ic { position: relative; }
.qp-mq.is-loading .pt-mq-ic::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(15, 143, 99, .25); border-top-color: #0f8f63; animation: pt-mq-spin .8s linear infinite; }
@keyframes pt-mq-spin { to { transform: rotate(360deg); } }
.pt-mq-n { font-variant-numeric: tabular-nums; }
.pt-mq-near:disabled { opacity: .6; cursor: wait; }

/* ── Collapsible panel (desktop) ── */
.qp-collapse-btn { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--qb-input-bg); border: 1px solid var(--qb-border); border-radius: 9px; color: var(--qb-text-dim); cursor: pointer; transition: background .2s, color .2s; }
.qp-collapse-btn:hover { background: var(--qb-hover); color: var(--qb-text); }
.qp-collapse-btn svg { transition: transform .3s cubic-bezier(.22, 1, .36, 1); }
.qp-mini-bearing { display: none; flex-shrink: 0; padding: 4px 9px; border-radius: 999px; background: rgba(16, 185, 129, .12); color: var(--qb-accent); font: 700 12.5px 'Space Grotesk', sans-serif; font-variant-numeric: tabular-nums; }
.qibla-panel.is-collapsed > :not(.qp-header) { display: none !important; }

/* ── Mosques block inside the panel ── */
.qp-mq { display: grid; gap: 10px; padding: 12px 16px 14px; border-bottom: 1px solid var(--qb-border); color: var(--qb-text); font: 600 13px 'Inter', sans-serif; flex-shrink: 0; }
.qp-mq-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.qp-mq .pt-mq-n { flex: 1; min-width: 0; line-height: 1.35; white-space: normal; overflow: visible; text-overflow: clip; font-size: 12.5px; }
.qp-mq .pt-mq-near { width: 100%; padding: 9px 14px; font-size: 13px; }
.qp-mq.is-hidden .pt-mq-n, .qp-mq.is-hidden .pt-mq-ic { opacity: .45; }
.qp-mq-sw { position: relative; flex: none; width: 38px; height: 22px; cursor: pointer; }
.qp-mq-sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.qp-mq-sw span { position: absolute; inset: 0; border-radius: 999px; background: var(--qb-input-bg); border: 1px solid var(--qb-border); transition: background .2s, border-color .2s; pointer-events: none; }
.qp-mq-sw span::after { content: ''; position: absolute; top: 2px; right: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.qp-mq-sw input:checked + span { background: #0f8f63; border-color: #0f8f63; }
.qp-mq-sw input:checked + span::after { transform: translateX(-16px); }
.qp-mq-sw input:focus-visible + span { outline: 2px solid #0f8f63; outline-offset: 2px; }

/* ── Folded panel: only its icon ── */
.qibla-panel.is-collapsed { width: 58px !important; max-height: 58px; padding: 0; border-radius: 18px; cursor: pointer; overflow: hidden !important; }
.qibla-panel.is-collapsed .qp-header { padding: 9px; border-bottom: 0; }
.qibla-panel.is-collapsed .qp-header > :not(.qp-icon) { opacity: 0; pointer-events: none; }
.qibla-panel.is-collapsed .qp-icon { width: 38px; height: 38px; }
.qibla-panel.is-collapsed:hover { transform: scale(1.05); }

/* ── Mobile: the panel peeks from the bottom (header + mosques), a tap opens it; folded = an icon in the corner ── */
@media (max-width: 640px) {
    .qibla-panel { transform: translateY(calc(100% - var(--qp-peek, 150px))); }
    .qibla-panel.panel-open { transform: translateY(0); }
    .qp-panel-toggle { display: none !important; }
    .qibla-panel:not(.panel-open) .qp-close-btn { display: none; }
    .qibla-panel .qp-header { cursor: pointer; }
    .qibla-panel.is-collapsed { top: auto; bottom: 14px; right: 14px; left: auto; transform: none !important; border-radius: 18px; }
    .qibla-page .mapboxgl-ctrl-bottom-right, .qibla-page .mapboxgl-ctrl-bottom-left { bottom: calc(var(--qp-peek, 150px) + 10px); }
    body.qp-collapsed.qibla-page .mapboxgl-ctrl-bottom-right, body.qp-collapsed.qibla-page .mapboxgl-ctrl-bottom-left { bottom: 14px; }
}
@media (max-width: 640px) { .qibla-panel:not(.panel-open):not(.is-collapsed) .qp-mini-bearing:not(:empty) { display: inline-block; } }

/* stronger GPS button (round 99) */
.qp-locate-inline-btn { width: 32px; height: 32px; padding: 0; border-radius: 10px; background: var(--qb-accent); color: #fff; box-shadow: 0 4px 10px -4px color-mix(in srgb, var(--qb-accent) 70%, transparent); transition: background .2s, color .2s, transform .15s; }
.qp-locate-inline-btn:hover { filter: brightness(1.12); color: #fff; }
.qp-locate-inline-btn:active { transform: scale(.92); }
.qp-locate-inline-btn svg { transform: translate(-1px, 1px); }
.qp-locate-inline-btn.loading { animation: none; background: var(--qb-accent); color: #fff; }
.qp-locate-inline-btn.loading svg { animation: qpLocPulse .9s ease-in-out infinite; }
@keyframes qpLocPulse { 50% { opacity: .35; transform: translate(-1px, 1px) scale(.85); } }
.qp-kaaba-btn { width: 46px; height: 46px; border-radius: 14px; }

/* fold / unfold with a slide (round 100); the arrow points where the panel goes */
.qp-header { white-space: nowrap; }
.qp-header > :not(.qp-icon) { transition: opacity .2s; }
.qp-collapse-btn svg { transform: rotate(90deg); }
@media (min-width: 641px) {
    .qibla-panel { transition: width .38s cubic-bezier(.22, 1, .36, 1), max-height .42s cubic-bezier(.22, 1, .36, 1), border-radius .38s, background .35s, border-color .35s, box-shadow .35s; }
    .qibla-panel.is-collapsed .qp-header > :not(.qp-icon) { transition-duration: .12s; }
}
@media (max-width: 640px) {
    .qp-collapse-btn svg { transform: rotate(180deg); }
    .qibla-panel.is-collapsed { animation: qpPop .3s cubic-bezier(.22, 1, .36, 1); }
}
@keyframes qpPop { from { opacity: 0; } }
