/* ══════════════════════════════════════════════════════════
   ISLAMIC HUB — qibla.css  (v3 Professional Compass)
   ══════════════════════════════════════════════════════════ */

.qibla-city {
  font-size: 13px; font-weight: 600; color: var(--gold);
  margin-bottom: 14px; letter-spacing: 1px;
}

/* ─── Status badge ─── */
.compass-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  padding: 4px 14px; border-radius: 20px; margin-bottom: 10px;
}
.compass-status.live {
  background: rgba(0,255,136,.08);
  border: 1px solid rgba(0,255,136,.3);
  color: var(--green-led);
}
.compass-status.static {
  background: rgba(255,220,0,.07);
  border: 1px solid rgba(255,220,0,.2);
  color: var(--yellow-led);
}
.compass-status-dot {
  width: 7px; height: 7px; border-radius: 50%;
}
.live .compass-status-dot {
  background: var(--green-led);
  animation: pulse 1.2s ease-in-out infinite;
}
.static .compass-status-dot { background: var(--yellow-led); }

/* ─── Heading readouts ─── */
.heading-row {
  display: flex; justify-content: center; gap: 30px; margin-bottom: 10px;
}
.heading-box { text-align: center; }
.heading-val {
  font-family: 'Digital-7 Mono', 'Courier New', monospace;
  font-size: 24px; color: var(--text-soft); letter-spacing: 2px;
}
.heading-label {
  font-size: 9px; letter-spacing: 2px;
  color: var(--text-muted); text-transform: uppercase; margin-top: 2px;
}

/* ─── Compass wrapper & outer ring ─── */
.compass-wrap {
  display: flex; justify-content: center; align-items: center;
  margin: 6px auto 16px;
}

.compass-outer {
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    rgba(10,13,30,0.98) 48%,
    rgba(201,168,76,0.04) 70%,
    rgba(0,0,0,0.95) 100%);
  border: 2px solid rgba(201,168,76,0.6);
  box-shadow:
    0 0 0 6px rgba(201,168,76,0.04),
    0 0 0 7px rgba(201,168,76,0.12),
    0 0 50px rgba(201,168,76,0.18),
    inset 0 0 40px rgba(0,0,0,0.7);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

/* ─── Compass Rose (rotates opposite to heading) ─── */
.compass-rose {
  position: absolute; inset: 0; border-radius: 50%;
  /* NO CSS transition — JS rAF handles smoothing */
  will-change: transform;
  transform-origin: center center;
}

/* Cardinal labels */
.compass-dir {
  position: absolute;
  font-family: 'Cinzel', 'Georgia', serif;
  font-size: 15px; font-weight: 700;
  width: 100%; text-align: center;
  user-select: none; pointer-events: none;
}
.compass-dir.n { top: 5px;    color: #ff2244; text-shadow: 0 0 14px rgba(255,34,68,.9), 0 0 28px rgba(255,34,68,.4); }
.compass-dir.s { bottom: 5px; color: rgba(255,255,255,0.75); font-size: 13px; }
.compass-dir.e { right: 7px;  top: 50%; transform: translateY(-50%); width: auto; color: rgba(255,255,255,0.75); font-size: 13px; }
.compass-dir.w { left: 7px;   top: 50%; transform: translateY(-50%); width: auto; color: rgba(255,255,255,0.75); font-size: 13px; }

/* Intercardinal */
.compass-dir.ne { top:  32px; right: 30px; width: auto; font-size: 10px; color: rgba(201,168,76,0.55); }
.compass-dir.se { bottom:32px;right: 30px; width: auto; font-size: 10px; color: rgba(201,168,76,0.55); }
.compass-dir.sw { bottom:32px;left:  30px; width: auto; font-size: 10px; color: rgba(201,168,76,0.55); }
.compass-dir.nw { top:  32px; left:  30px; width: auto; font-size: 10px; color: rgba(201,168,76,0.55); }

/* SVG tick ring (built by JS) */
.compass-tick-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; overflow: visible;
}

/* ─── Needle — always points North ─── */
.compass-needle-wrap {
  position: absolute;
  width: 10px; height: 220px;
  display: flex; flex-direction: column; align-items: center;
  transform-origin: center center;
  top: 50%; left: 50%;
  margin-top: -110px; margin-left: -5px;
  z-index: 5;
  will-change: transform;
  /* NO CSS transition */
}
.needle-north {
  width: 0; height: 0;
  border-left:  5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 105px solid #ff2244;
  filter: drop-shadow(0 0 10px rgba(255,34,68,.8));
  margin-top: 5px;
}
.needle-south {
  width: 0; height: 0;
  border-left:  5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 105px solid #444;
  margin-bottom: 5px;
}

/* ─── Qibla / Kaaba arrow ─── */
.qibla-arrow-wrap {
  position: absolute;
  width: 260px; height: 260px;
  display: flex; align-items: flex-start; justify-content: center;
  transform-origin: center center;
  z-index: 6;
  pointer-events: none;
  will-change: transform;
  /* NO CSS transition */
}
.qibla-arrow {
  font-size: 32px;
  margin-top: 4px;
  filter: drop-shadow(0 0 16px rgba(201,168,76,1)) drop-shadow(0 0 6px rgba(201,168,76,.6));
}

/* Center jewel */
.compass-center-dot {
  position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle, var(--gold-light), var(--gold));
  box-shadow: 0 0 18px rgba(201,168,76,.9);
  z-index: 10;
}

/* ─── Heading label row ─── */
.compass-dir-row {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  margin-top: 6px; margin-bottom: 4px;
}
.compass-dir-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: 2px;
  color: var(--text-muted); text-transform: uppercase;
}
#compassDirLabel {
  font-size: 18px; font-weight: 800;
  color: var(--gold); letter-spacing: 3px;
}

/* ─── Angle display ─── */
.qibla-angle-display {
  text-align: center; margin: 14px 0 10px;
}
.qa-label { font-size: 10px; letter-spacing: 2px; color: var(--text-muted); text-transform: uppercase; }
.qa-value {
  font-family: 'Digital-7 Mono', 'Courier New', monospace;
  font-size: 52px; color: var(--gold-light);
  text-shadow: 0 0 24px rgba(201,168,76,.45);
  line-height: 1.05;
}
.qa-from { font-size: 11px; color: var(--text-muted); letter-spacing: 1px; }

/* ─── Info row ─── */
.qibla-info-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0;
}
.qi-box {
  padding: 12px; border-radius: 13px;
  background: var(--surface); border: 1px solid var(--border);
  text-align: center;
}
.qi-label { font-size: 10px; letter-spacing: 1px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 4px; }
.qi-val   { font-size: 16px; font-weight: 700; color: var(--teal); letter-spacing: .5px; }

/* ─── Tip & Recalibrate ─── */
.qibla-tip {
  padding: 10px 14px; border-radius: 11px;
  background: rgba(201,168,76,.05); border: 1px solid var(--border);
  font-size: 13px; color: var(--text-soft); margin: 10px 0; text-align: center;
}
.qibla-recal-btn {
  width: 100%; padding: 13px; border-radius: 13px; margin-top: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--teal); font-family: 'Rajdhani', sans-serif;
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: all .2s; letter-spacing: 1px;
}
.qibla-recal-btn:hover { border-color: var(--teal); background: rgba(0,212,170,.07); }

/* ─── Pulse animation ─── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(1.3); }
}
