/* The location page (/location): the map, the route video and the opening hours. Moved here from the home page. */
body.store-location { background: #f6f5f3; color: #0b1b3f; font-size: 16px; }
.store-location a { text-decoration: none; }
.store-location .icon { flex: none; fill: none; stroke: var(--primary, #0155ee); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hours-card { padding: 0 16px; border-radius: 18px; background: #ffffff; }
.hours-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.hours-card summary::-webkit-details-marker { display: none; }
.hours-card summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-inline-end: 4px;
  border: solid #5a6478;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  transition: transform 0.15s;
}
.hours-card[open] summary::after { transform: rotate(-135deg); }
.hours-week { display: grid; gap: 2px; margin: 0 0 12px; padding: 0; list-style: none; }
.hours-week li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 10px; font-size: 14px; }
.hours-week .is-closed { color: #5a6478; }
.hours-week .hours-today { background: #eaf1fe; font-weight: 700; }

.route { display: flex; flex-direction: column; gap: 12px; }
.route-title { font-size: 18px; font-weight: 700; line-height: 1.4; }
.route-card { display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: 22px; background: #ffffff; box-shadow: 0 6px 20px rgb(11 27 63 / 6%); }

.route-map { position: relative; height: 220px; overflow: hidden; border-radius: 16px; background: #f3f1ec; }
/* MapLibre fills its container; the attribution must stay readable and inside the card. */
.route-map .maplibregl-ctrl-attrib { max-width: 100%; font-size: 10px; line-height: 1.3; background: rgb(255 255 255 / 80%); }
.route-map .maplibregl-ctrl-attrib a { color: #4a5568; }
.route-map .maplibregl-canvas { outline: none; }
.route-fallback { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; height: 100%; padding: 20px; color: #6b7280; text-align: center; }
.route-fallback .icon { width: 32px; height: 32px; }
.route-fallback-address { color: #1f2a44; font-size: 15px; font-weight: 500; }

.route-address { color: #4a5568; font-size: 14px; line-height: 1.5; }

.route-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.route-button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 8px 10px; border-radius: 14px; font-size: 15px; font-weight: 700; text-align: center; }
.route-button-waze { background: var(--primary-gradient); color: var(--on-primary, #ffffff); }
.route-button-waze .icon { stroke: var(--on-primary, #ffffff); }
.route-button-google { background: #e3f0fd; color: #0a3bb0; }

/* Pins are HTML, so Arabic and English labels are shaped by the browser. Position comes from the map. */
.pin { position: relative; width: 22px; height: 22px; }
.pin-dot { position: absolute; inset: 0; border-radius: 50%; }
.pin-label {
  position: absolute;
  inset-inline-start: 50%;
  white-space: nowrap;
  transform: translateX(-50%);
  color: #1f2a44;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 0 3px #ffffff, 0 0 3px #ffffff, 0 0 3px #ffffff;
  pointer-events: none;
}
[dir="rtl"] .pin-label { transform: translateX(50%); }
.pin-store .pin-dot { background: var(--primary-gradient); border: 3px solid #ffffff; box-shadow: 0 2px 8px rgb(1 85 238 / 45%); }
.pin-store .pin-dot::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent, #a4fc01); }
/* The store's name sits above its pin and landmark names below theirs, so a landmark right next door never covers it. */
.pin-store .pin-label { inset-block-end: 28px; }
.pin-pulse { position: absolute; inset: -9px; border-radius: 50%; background: radial-gradient(circle, var(--primary, #0155ee) 0%, rgb(1 85 238 / 0%) 70%); opacity: 0; animation: pin-pulse 2.4s ease-out infinite; }
@keyframes pin-pulse { 0% { opacity: 0.35; transform: scale(0.4); } 100% { opacity: 0; transform: scale(1.3); } }
.pin-landmark { width: 14px; height: 14px; }
.pin-landmark .pin-dot { background: #ffffff; border: 2.5px solid var(--primary, #0155ee); box-shadow: 0 1px 4px rgb(11 27 63 / 25%); }
.pin-landmark .pin-label { inset-block-start: 18px; max-width: 120px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; }
.pin-landmark .pin-pulse { display: none; }

/* Route video */
.video-card { gap: 8px; }
.video-open { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: #0b1b3f; cursor: pointer; }
.video-small { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.video-badge { position: absolute; inset-block-start: 10px; inset-inline-start: 10px; padding: 3px 12px; border-radius: 999px; background: rgb(11 27 63 / 72%); color: #ffffff; font-size: 12px; font-weight: 700; }
.video-play { position: absolute; inset-block-end: 10px; inset-inline-end: 10px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgb(255 255 255 / 92%); }
.video-play svg { fill: var(--primary, #0155ee); }
.video-card.is-playing .video-play { opacity: 0.75; }
.video-caption { padding: 0 4px 2px; color: #4a5568; font-size: 14px; line-height: 1.5; text-align: center; }
.video-dialog { width: min(430px, 100vw); max-width: 100vw; padding: 0; overflow: visible; border: 0; background: transparent; }
.video-dialog::backdrop { background: rgb(6 14 33 / 85%); }
.video-big { display: block; width: 100%; max-height: 80vh; border-radius: 16px; background: #000000; }
.video-close { position: absolute; inset-block-start: -54px; inset-inline-end: 8px; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgb(255 255 255 / 92%); cursor: pointer; }
.video-close svg { fill: none; stroke: #0b1b3f; stroke-width: 2.2; stroke-linecap: round; }

@media (prefers-reduced-motion: reduce) {
  .pin-pulse { animation: none; opacity: 0; }
}


/* The top of the location page: back button, the title and the language switch on the store's blue. */
.loc-page { max-width: 640px; margin: 0 auto; min-height: 100dvh; }
.loc-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--primary-gradient, #0155ee); color: var(--on-primary, #fff); }
.loc-head h1 { flex: 1; margin: 0; font-size: 18px; font-weight: 700; min-width: 0; }
.loc-content { display: flex; flex-direction: column; gap: 16px; padding: 16px 16px 40px; }
