/* Safarly Brand Hub (Salah, Qibla and the free tools after it). Mobile first. Uses the colours in site.css :root. */

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hub [hidden] { display: none !important; }
.hub { padding-top: clamp(24px, 4vw, 48px); }
.hub .wrap > * + * { margin-top: 16px; }

.hub-card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px, 3vw, 26px); box-shadow: var(--shadow-sm); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.hub-kicker { margin: 0; font-size: .85rem; font-weight: 600; color: var(--soft); }
.hub-hijri { margin: 2px 0 0; font-family: var(--serif); font-size: 1.15rem; color: var(--gold-2); }
.hub-label { margin: 0; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hub-note { margin: 10px 0 0; font-size: .85rem; line-height: 1.5; color: var(--muted); }

/* location bar */
.hub-loc { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; position: relative; z-index: 5; }
.hub-loc-main { display: flex; align-items: center; gap: 14px; flex: 1 1 240px; min-width: 0; }
.hub-loc-ic { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(76, 201, 255, .12); border: 1px solid rgba(76, 201, 255, .35); color: var(--neon-2); }
.hub-loc-ic .ic { width: 22px; height: 22px; }
.hub-loc-name { margin: 0; font: 600 1.15rem/1.25 var(--serif); overflow-wrap: anywhere; }
.hub-loc-sub { margin: 0; font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.hub-loc-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.hub-loc-btns .btn { padding: .65em 1.1em; font-size: .88rem; white-space: normal; text-align: center; }
.hub-loc-btns .ic { width: 1.1em; height: 1.1em; }
.hub-search { flex: 1 1 100%; position: relative; }
.hub-search input, .hub-set select { width: 100%; padding: .85em 1.1em; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(5, 10, 26, .6); color: var(--text); font: 500 1rem var(--sans); }
.hub-search input:focus-visible, .hub-set select:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; border-color: transparent; }
.hub-results { list-style: none; margin: 8px 0 0; padding: 6px; border-radius: 14px; border: 1px solid var(--line-2); background: rgba(10, 20, 48, .98); max-height: 280px; overflow-y: auto; }
.hub-results:empty { display: none; }
.hub-results li button { display: block; width: 100%; text-align: left; padding: .7em .9em; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: 500 .95rem var(--sans); cursor: pointer; }
.hub-results li button:hover, .hub-results li button:focus-visible { background: rgba(76, 201, 255, .14); outline: none; }
.hub-results small { display: block; color: var(--muted); font-size: .78rem; }

/* tabs: scroll sideways on small phones, never wrap badly */
.hub-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.hub-tabs::-webkit-scrollbar { display: none; }
.hub-tabs button { flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: .5em; padding: .7em 1.15em; border-radius: 99px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--soft); font: 600 .9rem var(--sans); cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.hub-tabs button .ic { width: 1.15em; height: 1.15em; }
.hub-tabs button:hover { border-color: rgba(76, 201, 255, .5); color: #fff; }
.hub-tabs button[aria-selected="true"] { color: var(--space); background: var(--gold-grad); border-color: transparent; box-shadow: 0 10px 26px -10px rgba(227, 189, 114, .8); }
.hub-tabs button:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; }

.hub-panel > * + * { margin-top: 16px; }

/* prayer times */
.salah-grid { display: grid; gap: 16px; }
.salah-next { text-align: center; display: flex; flex-direction: column; align-items: center; }
.salah-arc { width: min(100%, 360px); margin: 12px 0 0; }
.salah-arc svg { display: block; width: 100%; height: auto; overflow: visible; }
.arc-track { fill: none; stroke: rgba(150, 190, 255, .18); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 2 9; }
.arc-done { fill: none; stroke: var(--gold); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray .8s ease; }
.arc-sun { fill: var(--amber); filter: drop-shadow(0 0 8px rgba(255, 207, 112, .9)); transition: cx .8s ease, cy .8s ease; }
.salah-next .hub-label { margin-top: 10px; }
.salah-next-name { margin: 2px 0 0; font: 600 clamp(1.8rem, 6vw, 2.5rem)/1.15 var(--serif); background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.salah-next-time { margin: 0; font: 700 clamp(1.5rem, 5vw, 2rem)/1.2 var(--sans); font-variant-numeric: tabular-nums; }
.salah-count { margin: 6px 0 0; font-size: 1rem; color: var(--neon-2); font-variant-numeric: tabular-nums; }

.prayer-rows { list-style: none; margin: 0; padding: 0; }
.prayer-rows li { display: flex; align-items: center; gap: 12px; padding: 14px 6px; border-bottom: 1px solid var(--line); }
.prayer-rows li:last-child { border-bottom: 0; }
.prayer-rows .pr-ic { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .05); color: var(--soft); }
.prayer-rows .pr-ic .ic { width: 18px; height: 18px; }
.prayer-rows .pr-name { flex: 1; min-width: 0; font-weight: 600; font-size: 1.05rem; }
.prayer-rows .pr-name small { display: block; font-weight: 500; font-size: .76rem; color: var(--muted); }
.prayer-rows .pr-time { font: 700 1.2rem var(--sans); font-variant-numeric: tabular-nums; }
.prayer-rows li.is-next { background: linear-gradient(90deg, rgba(227, 189, 114, .16), rgba(227, 189, 114, .02)); border-radius: 14px; border-bottom-color: transparent; padding-inline: 12px; margin-inline: -6px; box-shadow: inset 0 0 0 1px rgba(227, 189, 114, .45); }
.prayer-rows li.is-next .pr-ic { background: var(--gold-grad); color: var(--space); }
.prayer-rows li.is-next .pr-time { color: var(--gold-2); }
.prayer-rows li.is-past { opacity: .55; }
.prayer-rows li.is-info .pr-name { font-weight: 500; color: var(--soft); }
.prayer-rows li.is-info .pr-time { font-size: 1.05rem; font-weight: 600; color: var(--soft); }

.hub-set summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: .6em; list-style: none; }
.hub-set summary::-webkit-details-marker { display: none; }
.hub-set summary .ic { width: 1.1em; height: 1.1em; color: var(--neon-2); }
.hub-set summary::after { content: "+"; margin-left: auto; font-size: 1.4rem; line-height: 1; color: var(--gold); }
.hub-set[open] summary::after { content: "-"; }
.hub-set-grid { display: grid; gap: 14px; margin-top: 16px; }
.hub-set label { display: grid; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--soft); }
.hub-set select { appearance: none; -webkit-appearance: none; padding-right: 2.4em; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }

.hub-alert { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.hub-alert > div:first-child { flex: 1 1 240px; }
.hub-alert-h { margin: 0; font-weight: 700; display: flex; align-items: center; gap: .5em; }
.hub-alert-h .ic { width: 1.1em; height: 1.1em; color: var(--gold); }
.hub-alert-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.hub-alert-btns .btn { white-space: normal; text-align: center; }
.hub-alert-btns .btn[aria-pressed="true"] { background: rgba(25, 184, 90, .18); border-color: rgba(25, 184, 90, .7); }

/* qibla */
.qibla { display: grid; gap: 22px; align-items: center; justify-items: center; }
.qibla-dial { width: min(100%, 360px); position: relative; }
.qibla-dial svg { display: block; width: 100%; height: auto; overflow: visible; }
.qibla-dial [data-qring] { transform-origin: 0 0; transition: transform .25s linear; }
.q-ring { fill: rgba(5, 10, 26, .55); stroke: var(--line-2); stroke-width: 1.5; }
.q-ring2 { fill: none; stroke: var(--line); stroke-width: 1; }
.q-ticks line { stroke: rgba(150, 190, 255, .45); stroke-width: 1; }
.q-ticks line.major { stroke: var(--soft); stroke-width: 2; }
.q-n { fill: #ff7a7a; font: 700 15px var(--sans); }
.q-c { fill: var(--muted); font: 600 11px var(--sans); }
.q-arrow { fill: var(--gold); }
.q-needle { fill: var(--gold); opacity: .9; filter: drop-shadow(0 0 6px rgba(227, 189, 114, .7)); }
.q-hub { fill: var(--space); stroke: var(--gold); stroke-width: 2; }
.qibla-dial.is-aligned .q-ring { stroke: var(--wa); }
.qibla-dial.is-aligned .q-needle, .qibla-dial.is-aligned .q-arrow { fill: #5be08a; filter: drop-shadow(0 0 8px rgba(25, 184, 90, .9)); }
.qibla-ok { margin: 10px 0 0; text-align: center; font-weight: 700; color: #5be08a; display: flex; justify-content: center; align-items: center; gap: .4em; }
.qibla-ok .ic { width: 1.1em; height: 1.1em; }
.qibla-info { text-align: center; width: 100%; }
.qibla-deg { margin: 4px 0 0; font: 600 clamp(2.4rem, 9vw, 3.4rem)/1.1 var(--serif); background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.qibla-sub { margin: 4px 0 0; color: var(--soft); }
.qibla-info .hub-alert-btns { justify-content: center; margin-top: 18px; }

/* ramadan */
.ram-big { margin: 4px 0 0; font: 600 clamp(1.7rem, 6vw, 2.4rem)/1.2 var(--serif); background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ram-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ram-table { width: 100%; min-width: 320px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ram-table th { text-align: left; padding: 10px 8px; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: rgba(10, 20, 48, .96); }
.ram-table th small { display: block; text-transform: none; letter-spacing: 0; font-weight: 500; }
.ram-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); font-weight: 600; white-space: nowrap; }
.ram-table td:first-child { color: var(--gold-2); }
.ram-table td:nth-child(2) { font-weight: 500; color: var(--soft); }
.ram-table tr.is-today td { background: rgba(227, 189, 114, .14); }
.ram-table tr.is-today td:first-child { box-shadow: inset 3px 0 0 var(--gold); }

/* nearby */
.near-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.near-head .hub-label span { color: var(--gold-2); text-transform: none; letter-spacing: 0; font-size: .95rem; }
.near-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.near-list li { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: rgba(255, 255, 255, .035); }
.near-list li > div { flex: 1; min-width: 0; }
.near-list h3 { margin: 0; font-size: 1rem; font-weight: 700; overflow-wrap: anywhere; }
.near-list p { margin: 2px 0 0; font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.near-km { flex: none; text-align: center; font-weight: 700; color: var(--gold-2); font-variant-numeric: tabular-nums; line-height: 1.15; }
.near-km small { display: block; font-size: .7rem; font-weight: 500; color: var(--muted); }
.near-go { flex: none; padding: .6em 1em; font-size: .82rem; }
.near-empty, .near-wait { padding: 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line-2); border-radius: var(--radius-sm); }
.hub-credit { text-align: center; }

.hub-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.hub-cta p { margin: 0; flex: 1 1 260px; color: var(--soft); }

@media (min-width: 720px) {
  .salah-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: stretch; }
  .hub-set-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qibla { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; }
  .qibla-info { text-align: left; }
  .qibla-info .hub-alert-btns { justify-content: flex-start; }
  .near-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) { .hub-set-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .arc-done, .arc-sun, .qibla-dial [data-qring] { transition: none; } }

/* room under the last card so the floating "Call us free" button never covers it */
.hub { padding-bottom: 110px; }

/* slim gold scrollbars (lists and tables) */
.hub-results, .ram-scroll { scrollbar-width: thin; scrollbar-color: rgba(227, 189, 114, .55) transparent; }
.hub-results::-webkit-scrollbar, .ram-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.hub-results::-webkit-scrollbar-thumb, .ram-scroll::-webkit-scrollbar-thumb { background: rgba(227, 189, 114, .5); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
.hub-results::-webkit-scrollbar-track, .ram-scroll::-webkit-scrollbar-track { background: transparent; }
.hub-panel > .near-list { margin-top: 16px; }

/* ===== Travel Passport ===== */
.pp-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pp-stat { padding: 16px; min-width: 0; }
.pp-num { margin: 4px 0 0; font: 600 clamp(1.9rem, 7vw, 2.8rem)/1.1 var(--serif); background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pp-num.pp-level, .pp-num.pp-trip { font-size: clamp(1.25rem, 4.5vw, 1.7rem); line-height: 1.2; padding-top: .35em; }
.pp-sub { margin: 2px 0 0; font-size: .8rem; color: var(--muted); line-height: 1.4; }

.pp-maphead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 12px; }
.pp-maphead .hub-label { margin-right: auto; }
.pp-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .78rem; color: var(--soft); }
.pp-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: -4px; }
.lg-v { background: var(--gold); } .lg-w { background: rgba(76, 201, 255, .55); } .lg-h { background: transparent; border: 2px solid #fff; }
.pp-zoom { display: flex; gap: 6px; }
.pp-zoom .btn { padding: .45em .9em; min-width: 40px; font-size: .9rem; }
.pp-map { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: radial-gradient(120% 120% at 50% 40%, rgba(18, 32, 74, .7), rgba(5, 10, 26, .85)); border: 1px solid var(--line); aspect-ratio: 2 / 1; }
.pp-map svg { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-select: none; }
.pp-map.is-zoomed svg { touch-action: none; cursor: grab; }
.cn { fill: rgba(150, 190, 255, .17); stroke: rgba(5, 10, 26, .9); stroke-width: .35; cursor: pointer; transition: fill .2s; vector-effect: non-scaling-stroke; }
.cn:hover { fill: rgba(76, 201, 255, .38); }
.cn.is-wish { fill: rgba(76, 201, 255, .5); }
.cn.is-visited { fill: var(--gold); }
.cn.is-home { stroke: #fff; stroke-width: 1.6; }
.cn-dot { stroke-width: .5; }
.pp-loading { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; color: var(--muted); font-size: .9rem; }
.pp-pick { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.pp-pick-name { margin: 0; font: 600 1.4rem/1.2 var(--serif); }
.pp-pick-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-pick-btns .btn { padding: .65em 1.1em; font-size: .9rem; }
.pp-pick-btns .btn .ic { width: 1.1em; height: 1.1em; }
.pp-pick-btns .btn[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--neon), 0 10px 24px -10px rgba(76, 201, 255, .6); }
.pp-pick-extra { display: grid; gap: 10px; }
.pp-pick-extra label, .pp-trip-form label { display: grid; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--soft); }
.pp-pick-extra input, .pp-trip-form input, .pp-trip-form select, .pp-q { width: 100%; padding: .75em 1em; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(5, 10, 26, .6); color: var(--text); font: 500 .95rem var(--sans); }
.pp-trip-form select { appearance: none; -webkit-appearance: none; padding-right: 2.4em; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.pp-pick-extra input:focus-visible, .pp-trip-form input:focus-visible, .pp-trip-form select:focus-visible, .pp-q:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; border-color: transparent; }
.pp-trip-form input[type="date"] { color-scheme: dark; }
.pp-trip-form { display: grid; gap: 12px; margin-top: 12px; align-items: end; }
.pp-trip-form .btn { white-space: normal; }

.pp-cont-grid { display: grid; gap: 14px 22px; margin-top: 12px; }
.pp-cont-top { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; font-weight: 600; margin-bottom: 6px; }
.pp-cont-top span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.pp-bar { height: 8px; border-radius: 99px; background: rgba(150, 190, 255, .14); overflow: hidden; }
.pp-bar-i { display: block; height: 100%; border-radius: 99px; background: var(--gold-grad); width: 0; transition: width .6s ease; }
.pp-list .pp-q { margin-top: 10px; }
.pp-rows { list-style: none; margin: 10px 0 0; padding: 0; }
.pp-row { display: flex; align-items: center; gap: 8px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.pp-row-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.pp-row.is-visited .pp-row-name { color: var(--gold-2); }
.pp-row.is-wish .pp-row-name { color: var(--neon-2); }
.pp-mini { padding: .45em .95em; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); color: var(--soft); font: 600 .8rem var(--sans); cursor: pointer; min-height: 36px; }
.pp-mini.on { background: var(--gold-grad); color: var(--space); border-color: transparent; }
.pp-row.is-wish .pp-mini.on { background: rgba(76, 201, 255, .25); color: #fff; border-color: rgba(76, 201, 255, .7); }
.pp-group { border-bottom: 1px solid var(--line); }
.pp-group summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 4px; cursor: pointer; font-weight: 700; list-style: none; }
.pp-group summary::-webkit-details-marker { display: none; }
.pp-group summary span { color: var(--muted); font-weight: 500; font-size: .85rem; font-variant-numeric: tabular-nums; margin-left: auto; }
.pp-group summary::after { content: "+"; margin-left: 12px; color: var(--gold); font-size: 1.3rem; line-height: 1; }
.pp-group[open] summary::after { content: "-"; }
.pp-group .pp-rows { margin-top: 0; max-height: 340px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(227, 189, 114, .55) transparent; }
.pp-import { cursor: pointer; position: relative; overflow: hidden; }
.pp-import input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.pp-q::-webkit-search-cancel-button { filter: invert(.8); }
@media (min-width: 720px) {
  .pp-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pp-pick { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .pp-pick-extra { grid-column: 1 / -1; grid-template-columns: 140px minmax(0, 1fr); }
  .pp-trip-form { grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) auto auto; }
  .pp-cont-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.pp-w0 { width: 0%; }
.pp-w5 { width: 5%; }
.pp-w10 { width: 10%; }
.pp-w15 { width: 15%; }
.pp-w20 { width: 20%; }
.pp-w25 { width: 25%; }
.pp-w30 { width: 30%; }
.pp-w35 { width: 35%; }
.pp-w40 { width: 40%; }
.pp-w45 { width: 45%; }
.pp-w50 { width: 50%; }
.pp-w55 { width: 55%; }
.pp-w60 { width: 60%; }
.pp-w65 { width: 65%; }
.pp-w70 { width: 70%; }
.pp-w75 { width: 75%; }
.pp-w80 { width: 80%; }
.pp-w85 { width: 85%; }
.pp-w90 { width: 90%; }
.pp-w95 { width: 95%; }
.pp-w100 { width: 100%; }
