/* ============================================================
   location-style.css — HealthCalcsHub Design System
   Theme: Blue-to-Red Gradient with Data Points Animation
   ============================================================ */

/* ── WRAPPER ────────────────────────────────────────────────── */
.loc-wrap {
  padding: 28px 0 36px;
  position: relative;
}

.loc-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── META ROW ───────────────────────────────────────────────── */
.loc-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
  flex-wrap: wrap;
}

.loc-meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.loc-meta-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.loc-cat-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #4d8fff 0%, #9b5de5 50%, #ff4d6d 100%);
  color: #fff;
  padding: 3px 10px;
  border-radius: 4px;
  line-height: 1.8;
}

.loc-city-pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent, #4d8fff);
  text-transform: uppercase;
  opacity: 0.85;
}

.loc-day-counter {
  font-size: 10px;
  color: var(--text-dim, #4a5578);
  letter-spacing: 0.06em;
  font-weight: 600;
}

.loc-shuffle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid rgba(77, 143, 255, 0.28);
  color: var(--accent, #4d8fff);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  letter-spacing: 0.04em;
  font-family: inherit;
}
.loc-shuffle-btn:hover {
  background: rgba(77, 143, 255, 0.1);
  border-color: var(--accent, #4d8fff);
  transform: scale(1.03);
}
.loc-shuffle-btn svg {
  flex-shrink: 0;
  transition: transform 0.4s;
}
.loc-shuffle-btn:active svg {
  transform: rotate(180deg);
}

html.light .loc-shuffle-btn {
  border-color: rgba(37, 99, 235, 0.3);
  color: var(--accent, #2563eb);
}
html.light .loc-shuffle-btn:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--accent, #2563eb);
}

/* ── MAIN CARD ──────────────────────────────────────────────── */
.loc-card {
  background: rgba(13, 15, 32, 0.72);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(77, 143, 255, 0.18);
  border-radius: 20px;
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 36px;
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.loc-card:hover {
  border-color: rgba(155, 93, 229, 0.35);
  box-shadow: 0 12px 48px rgba(155, 93, 229, 0.1);
}

html.light .loc-card {
  background: rgba(244, 246, 255, 0.72);
  border-color: rgba(37, 99, 235, 0.2);
}
html.light .loc-card:hover {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 12px 48px rgba(124, 58, 237, 0.1);
}

/* Diagonal gradient shimmer overlay */
.loc-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(77, 143, 255, 0.04)  0%,
    rgba(155, 93, 229, 0.03)  50%,
    rgba(255, 77, 109, 0.04)  100%);
  pointer-events: none;
}

/* Card entrance */
@keyframes locCardIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes locFadeSlide {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.loc-card.animating {
  animation: locFadeSlide 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* ── TEXT COLUMN ────────────────────────────────────────────── */
.loc-text-col { min-width: 0; }

.loc-type-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim, #4a5578);
  border: 1px solid rgba(77, 143, 255, 0.2);
  border-radius: 3px;
  padding: 2px 8px;
  margin-bottom: 10px;
}

.loc-topic {
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 800;
  color: var(--text-main, #e8ecf5);
  margin: 0 0 12px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-family: 'Sora', sans-serif;
}

.loc-body {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--text-sub, #8892b0);
  max-width: 640px;
}
.loc-body .hl {
  color: var(--accent, #4d8fff);
  font-weight: 700;
  border-bottom: 1px dashed rgba(77, 143, 255, 0.4);
}
.loc-body b { color: var(--text-main, #e8ecf5); font-weight: 700; }
.loc-body em { font-style: italic; color: var(--text-main, #e8ecf5); }

/* ── STATS PILLS ────────────────────────────────────────────── */
.loc-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.loc-stat-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent, #4d8fff);
  background: rgba(77, 143, 255, 0.08);
  border: 1px solid rgba(77, 143, 255, 0.22);
  border-radius: 6px;
  padding: 6px 12px;
  white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
  cursor: default;
}
.loc-stat-pill:hover {
  background: rgba(77, 143, 255, 0.16);
  transform: translateY(-2px);
}

html.light .loc-stat-pill {
  color: var(--accent, #2563eb);
  background: rgba(37, 99, 235, 0.07);
  border-color: rgba(37, 99, 235, 0.22);
}
html.light .loc-stat-pill:hover {
  background: rgba(37, 99, 235, 0.14);
}

/* ── ACTIONS ────────────────────────────────────────────────── */
.loc-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.loc-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(77, 143, 255, 0.3);
  color: var(--accent, #4d8fff);
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.2s;
  font-family: inherit;
}
.loc-share-btn:hover {
  background: linear-gradient(90deg, #4d8fff 0%, #9b5de5 50%, #ff4d6d 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 20px rgba(155, 93, 229, 0.3);
}

html.light .loc-share-btn {
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--accent, #2563eb);
}
html.light .loc-share-btn:hover {
  background: linear-gradient(90deg, #2563eb 0%, #7c3aed 50%, #e11d48 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.25);
}

/* ── ICON COLUMN ────────────────────────────────────────────── */
.loc-icon-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* ── ORB ────────────────────────────────────────────────────── */
.loc-orb-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Multi-colour ripple rings — blue, violet, red */
.loc-orb-ring {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: orbRipple 4s infinite cubic-bezier(0.2, 0.5, 0.2, 1);
}
.loc-orb-ring-1 {
  border: 1px solid #4d8fff;
  animation-delay: 0s;
}
.loc-orb-ring-2 {
  border: 1px solid #9b5de5;
  animation-delay: 1.2s;
}
.loc-orb-ring-3 {
  border: 1px solid #ff4d6d;
  animation-delay: 2.4s;
}

@keyframes orbRipple {
  0%   { transform: scale(0.5); opacity: 0; }
  30%  { opacity: 0.35; }
  100% { transform: scale(1.8); opacity: 0; }
}

.loc-icon-frame {
  font-size: 64px;
  z-index: 2;
  filter: drop-shadow(0 0 18px rgba(155, 93, 229, 0.35));
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s;
  animation: locFloat 5s ease-in-out infinite;
  position: relative;
  user-select: none;
  cursor: default;
}
.loc-card:hover .loc-icon-frame {
  transform: scale(1.15) rotate(5deg);
  filter: drop-shadow(0 0 28px rgba(155, 93, 229, 0.55));
}

@keyframes locFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-8px) scale(1.04); }
}

.loc-currency-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim, #4a5578);
  letter-spacing: 0.08em;
  text-align: center;
}

/* ── BOTTOM NAV ─────────────────────────────────────────────── */
.loc-nav-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}
.loc-nav-arr {
  background: transparent;
  border: 1px solid rgba(77, 143, 255, 0.2);
  color: var(--text-dim, #4a5578);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.loc-nav-arr:hover {
  border-color: var(--accent, #4d8fff);
  color: var(--accent, #4d8fff);
  background: rgba(77, 143, 255, 0.08);
}

html.light .loc-nav-arr {
  border-color: rgba(37, 99, 235, 0.2);
}
html.light .loc-nav-arr:hover {
  border-color: var(--accent, #2563eb);
  color: var(--accent, #2563eb);
  background: rgba(37, 99, 235, 0.08);
}

.loc-dot-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 280px;
}
.loc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(77, 143, 255, 0.2);
  cursor: pointer;
  transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
  flex-shrink: 0;
}
.loc-dot.active {
  /* Gradient dot: paint as inline radial or use solid midpoint */
  background: #9b5de5;
  transform: scale(1.4);
  box-shadow: 0 0 10px #9b5de5;
}
.loc-dot:hover:not(.active) {
  background: rgba(77, 143, 255, 0.5);
}

html.light .loc-dot { background: rgba(37, 99, 235, 0.2); }
html.light .loc-dot.active {
  background: #7c3aed;
  box-shadow: 0 0 10px #7c3aed;
}
html.light .loc-dot:hover:not(.active) { background: rgba(37, 99, 235, 0.45); }

/* ── SHUFFLE ANIMATIONS ─────────────────────────────────────── */
.loc-shuffling .loc-icon-frame {
  animation: insIconPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.loc-shuffling .loc-orb-ring {
  animation: insRingFlash 0.5s ease-out forwards;
}
.loc-shuffling .loc-orb-ring-1 { border-color: rgba(77, 143, 255, 0.9); }
.loc-shuffling .loc-orb-ring-2 { border-color: rgba(155, 93, 229, 0.9); }
.loc-shuffling .loc-orb-ring-3 { border-color: rgba(255, 77, 109, 0.9); }

@keyframes insIconPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.4) rotate(15deg); filter: brightness(1.5); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes insRingFlash {
  0%   { transform: scale(1); opacity: 1; border-width: 4px; }
  100% { transform: scale(2); opacity: 0; border-width: 1px; }
}

/* ── CATEGORY COLOUR ACCENTS ────────────────────────────────── */
.loc-wrap[data-cat="islamic"]   { --cat-accent: #4d8fff; }
.loc-wrap[data-cat="finance"]   { --cat-accent: #9b5de5; }
.loc-wrap[data-cat="car"]       { --cat-accent: #ff4d6d; }
.loc-wrap[data-cat="lifestyle"] { --cat-accent: #ff7a45; }

/* ── RTL ────────────────────────────────────────────────────── */
[dir="rtl"] .loc-card { grid-template-columns: 200px 1fr; }
[dir="rtl"] .loc-text-col { order: 2; }
[dir="rtl"] .loc-icon-col { order: 1; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 680px) {
  .loc-card {
    grid-template-columns: 1fr;
    padding: 22px 18px 20px;
    text-align: center;
  }
  .loc-icon-col { order: -1; }
  .loc-orb-wrap { width: 100px; height: 100px; margin: 0 auto; }
  .loc-icon-frame { font-size: 44px; }
  .loc-stats { justify-content: center; }
  .loc-actions { justify-content: center; }
  .loc-body { font-size: 0.83rem; }
  [dir="rtl"] .loc-text-col { order: 2; }
  [dir="rtl"] .loc-icon-col { order: -1; }
}

@media (max-width: 400px) {
  .loc-stat-pill { font-size: 10px; padding: 5px 9px; }
}
