/* The qibla page (qibla.html). Sky, cards and questions come from
   styles.css and prayer-times.css. */
.qb-card { margin: 22px 0 10px; padding: 22px; display: grid; gap: 18px 26px; grid-template-columns: minmax(0, 1fr); justify-items: center; background: var(--raised); border: 1px solid var(--line); border-radius: 24px; }
@media (min-width: 640px) { .qb-card { grid-template-columns: 250px minmax(0, 1fr); justify-items: start; align-items: center; } }

/* The dial, with the compass's button and its "turn" line right under it */
.qb-dial-col { display: grid; justify-items: center; gap: 10px; width: 100%; max-width: 280px; }
.qb-dial { width: 250px; max-width: 100%; height: auto; display: block; }
.qb-start { width: 100%; max-width: 260px; }
.doc .qb-turn { margin: 0; min-height: 1.4em; font: 800 21px/1.3 var(--round); color: var(--ink); text-align: center; }
.qb-turn:empty { display: none; }
@media (hover: none) { .qb-dial { cursor: pointer; } }
.qb-face { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1.5; }
.qb-tick { stroke: var(--ink-faint); stroke-width: 1.5; stroke-linecap: round; opacity: 0.55; }
.qb-tick.major { stroke-width: 2.5; opacity: 0.9; }
.qb-letter { fill: var(--ink-dim); font: 800 15px var(--round); text-anchor: middle; dominant-baseline: central; }
.qb-letter.n { fill: var(--amber); }
.qb-needle { stroke: var(--amber); stroke-width: 5; stroke-linecap: round; }
.qb-hub { fill: var(--ink); }
.qb-cube { fill: #1D1B24; }
.qb-band { stroke: #D7A93B; stroke-width: 2.4; }
#qb-rose { transition: transform 0.25s linear; }
/* The mark for the phone's top shows only with the compass on. */
.qb-top { fill: var(--ink); opacity: 0; transition: opacity 0.3s; }
.qb-on .qb-top { opacity: 1; }
.qb-aligned .qb-needle { stroke: #2E9A6E; }
.qb-aligned .qb-face { fill: rgba(46, 154, 110, 0.14); stroke: #2E9A6E; }
@media (prefers-reduced-motion: reduce) { #qb-rose { transition: none; } }
/* Before a place is chosen: just the rose. */
html:not(.qb-has) .qb-needle, html:not(.qb-has) #qb-kaaba { display: none; }

/* The readout */
.qb-read { min-width: 0; width: 100%; text-align: center; }
@media (min-width: 640px) { .qb-read { text-align: left; } }
.doc .qb-read p { margin: 0; }
.qb-place { font-weight: 800; font-size: 15px; color: var(--ink-faint) !important; }
.qb-deg { font: 900 56px/1.05 var(--round); color: var(--ink); margin: 4px 0 2px !important; font-variant-numeric: tabular-nums; }
.doc .qb-words { color: var(--ink); font-weight: 800; font-size: 19px; }
.doc .qb-detail { margin-top: 6px; font-size: 14px; color: var(--ink-faint); }
/* With the compass on, the dial and its "turn" line are what matter. */
.qb-on .qb-detail { display: none; }
.qb-aligned .qb-turn { color: #237A57 !important; }
html:not(.qb-has) .qb-have { display: none; }
html.qb-has .qb-none { display: none; }

/* Choosing the place */
.qb-pick { grid-column: 1 / -1; width: 100%; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 16px; border-top: 1px solid var(--line); }
.qb-btn { font: inherit; font-size: 15px; font-weight: 800; color: var(--button-ink); background: var(--button); border: 0; border-radius: 14px; padding: 11px 16px; cursor: pointer; }
.qb-btn.alt { color: var(--ink); background: var(--raised); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
#qb-city-form { flex: 1 1 240px; min-width: 0; }
.qb-combo { position: relative; }
#qb-city { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--raised); border: 1.5px solid var(--line-strong); border-radius: 14px; padding: 10px 13px; }
#qb-city:focus { outline: none; border-color: var(--amber); }
/* Suggestions under the box (the card is always light, so plain colours). */
.doc .qb-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; max-height: 290px; overflow-y: auto; background: #FFFDF9; border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 14px 34px rgba(34, 23, 72, 0.18); }
.doc .qb-list li { margin: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 11px 12px; border-radius: 11px; cursor: pointer; font-size: 16px; color: var(--ink); }
.doc .qb-list li.active, .doc .qb-list li:hover { background: var(--gold-dim); }
.qb-opt-name { font-weight: 700; min-width: 0; }
.qb-opt-where { font-weight: 500; color: var(--ink-faint); }
.qb-opt-deg { font-weight: 800; color: var(--ink-dim); font-variant-numeric: tabular-nums; flex: none; }
.doc .qb-list li.qb-empty { cursor: default; font-size: 14.5px; color: var(--ink-dim); background: none; }
.doc .qb-note, .doc .qb-help { grid-column: 1 / -1; width: 100%; margin: 0; font-size: 14.5px; color: var(--ink-dim); }
.doc .qb-privacy { grid-column: 1 / -1; width: 100%; margin: 0; font-size: 13.5px; color: var(--ink-faint); }

/* Major cities */
.qb-table-wrap { overflow-x: auto; margin-top: 12px; }
table.qb-cities { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
table.qb-cities th { text-align: left; font-size: 12.5px; font-weight: 800; color: var(--ink-faint); padding: 6px 8px; border-bottom: 1px solid var(--line-strong); }
table.qb-cities td { padding: 7px 8px; border-bottom: 1px solid var(--line); color: var(--ink); }
table.qb-cities td:nth-child(2) { font-weight: 800; white-space: nowrap; }
@media (max-width: 560px) { table.qb-cities { font-size: 13.5px; } table.qb-cities td, table.qb-cities th { padding: 6px 4px; } .qb-far-col { display: none; } }
