/* ==========================================================================
   UloomWeb shared design system — uloomweb.com
   Brand: navy #19194a + gold #ffcc00 (from the root page and the UloomWeb logo).
   Loaded AFTER each page's own styles. Rules are either namespaced (.uw-*)
   or scoped to body.uw-site chrome classes, so tool pages can link this
   file safely; the full chrome restyle applies on the homepages.
   ========================================================================== */
:root {
  --uw-navy: #19194a;
  --uw-navy-2: #232360;
  --uw-navy-3: #10102f;
  --uw-gold: #ffcc00;
  --uw-gold-2: #ffd900;
  --uw-ink: #1d1d29;
  --uw-muted: #5a5a6e;
  --uw-bg: #f7f4ec;
  --uw-card: #ffffff;
  --uw-line: #e5dfc9;
  --uw-radius: 14px;
  --uw-shadow: 0 6px 24px rgba(25, 25, 74, 0.10);
  --uw-shadow-lg: 0 14px 40px rgba(25, 25, 74, 0.16);
  --uw-font-ur: 'Mehr', 'MehrNastaliq', 'Amiri', serif;
  --uw-font-en: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* ---- generic components (opt-in, namespaced) ---- */
.uw-container { max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
.uw-card {
  background: var(--uw-card); border: 1px solid var(--uw-line);
  border-radius: var(--uw-radius); box-shadow: var(--uw-shadow); padding: 20px;
}
.uw-btn {
  display: inline-block; padding: 10px 22px; border-radius: 999px; cursor: pointer;
  background: var(--uw-gold); color: var(--uw-navy); font-weight: 700; border: 2px solid var(--uw-gold);
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.uw-btn:hover { background: var(--uw-gold-2); box-shadow: var(--uw-shadow); transform: translateY(-1px); }
.uw-btn.uw-btn-outline { background: transparent; color: var(--uw-gold); }
.uw-btn.uw-btn-outline:hover { background: rgba(255, 204, 0, .12); }
.uw-input, .uw-select {
  width: 100%; padding: 10px 12px; border: 1.5px solid #c9c4ae; border-radius: 10px;
  background: #fff; color: var(--uw-ink); font: inherit;
}
.uw-input:focus, .uw-select:focus { outline: 3px solid rgba(255, 204, 0, .45); border-color: var(--uw-navy); }
.uw-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; }
.uw-table th { background: var(--uw-navy); color: var(--uw-gold); padding: 10px 8px; }
.uw-table td { padding: 8px; border-bottom: 1px solid #eee8d2; text-align: center; }
.uw-table tr:nth-child(even) td { background: #fbf9f1; }
.uw-place-name { overflow-wrap: anywhere; word-break: normal; text-overflow: clip; white-space: normal; }

/* ---- homepage chrome restyle (body.uw-site) ---- */
/* background-COLOR only here: the shorthand would reset background-image
   and wipe the landing page's own BG-02/BG-01 backdrop photos. */
body.uw-site { background-color: var(--uw-bg); color: var(--uw-ink); }
body.uw-site .header {
  background: linear-gradient(135deg, var(--uw-navy-3), var(--uw-navy) 55%, var(--uw-navy-2));
  box-shadow: 0 4px 18px rgba(16, 16, 47, .35);
  border-bottom: 3px solid var(--uw-gold);
  position: sticky; top: 0; z-index: 1000;
}
body.uw-site .header .logo { filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
body.uw-site .nav a {
  border-radius: 999px; padding: 6px 12px; transition: background .15s ease, color .15s ease;
}
body.uw-site .nav a:hover { background: rgba(255, 204, 0, .16); color: var(--uw-gold-2) !important; }
body.uw-site .side-btn {
  background: transparent; color: var(--uw-gold); border: 1.5px solid var(--uw-gold);
  border-radius: 999px; padding: 6px 16px; cursor: pointer; font-weight: 700;
  transition: background .15s ease, color .15s ease;
}
body.uw-site .side-btn:hover { background: var(--uw-gold); color: var(--uw-navy); }
body.uw-site .hero {
  background: linear-gradient(160deg, var(--uw-navy-3), var(--uw-navy) 60%, #2b2b6b);
  color: #fff;
}
body.uw-site .hero-content h1, body.uw-site .hero h1 { color: #fff; }
body.uw-site .hero-content h1::after, body.uw-site .hero h1::after {
  content: ''; display: block; width: 84px; height: 4px; border-radius: 2px;
  background: var(--uw-gold); margin: 14px auto 0;
}
body.uw-site #prayer-times-table table, body.uw-site .hero table {
  border-radius: 12px; overflow: hidden; box-shadow: var(--uw-shadow-lg);
}
body.uw-site .cta-button, body.uw-site .share-button {
  background: var(--uw-gold); color: var(--uw-navy); border: none;
  border-radius: 999px; font-weight: 700; box-shadow: var(--uw-shadow);
  transition: transform .15s ease, background .15s ease;
}
body.uw-site .cta-button:hover, body.uw-site .share-button:hover { background: var(--uw-gold-2); transform: translateY(-1px); }
body.uw-site .card {
  background: var(--uw-card); border: 1px solid var(--uw-line); border-top: 4px solid var(--uw-gold);
  border-radius: var(--uw-radius); box-shadow: var(--uw-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
body.uw-site .card:hover { transform: translateY(-3px); box-shadow: var(--uw-shadow-lg); }
body.uw-site .footer {
  background: linear-gradient(180deg, var(--uw-navy), var(--uw-navy-3));
  color: #e9e6da; border-top: 3px solid var(--uw-gold);
}
body.uw-site .footer h3, body.uw-site .footer h4, body.uw-site .footer h5 { color: var(--uw-gold); }
body.uw-site .footer a { color: #e9e6da; text-decoration: none; }
body.uw-site .footer a:hover { color: var(--uw-gold-2); }
body.uw-site .footer-lower { border-top: 1px solid rgba(255, 204, 0, .25); }

/* Root language selector (body.uw-site at site root) */
body.uw-site .button {
  border-radius: 999px; border: 2px solid var(--uw-gold);
  box-shadow: var(--uw-shadow-lg); transition: transform .15s ease, box-shadow .15s ease;
}
body.uw-site .button:hover { transform: translateY(-2px) scale(1.02); }

@media (max-width: 768px) {
  body.uw-site .nav a { padding: 6px 8px; }
  body.uw-site .card { border-radius: 12px; }
}

/* ==========================================================================
   Responsive layer (2026-10-31)
   A) Safety rules for every page that links this file: media and wide
      result tables can scroll instead of breaking the layout.
   B) Homepage (body.uw-site) mobile fixes: the language buttons and the
      hamburger were absolutely positioned over each other, and the hero
      prayer-times table (8 nowrap columns) overflowed small screens.
   ========================================================================== */
img, video, iframe, embed, object, canvas, svg { max-width: 100%; }
pre { max-width: 100%; overflow-x: auto; }
.table-container, #results { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 1100px) {
  body.uw-site .nav ul li { font-size: 1.02rem; margin: 0 0.45vw; }
}

/* Phones and small tablets: one clean header row — logo, hamburger,
   language buttons — all in normal flow, nothing overlapping. */
@media (max-width: 860px) {
  body.uw-site .header {
    flex-wrap: wrap; gap: 6px 10px; padding: 10px 12px; position: sticky;
  }
  body.uw-site .header .logo { width: 54px; max-width: 54px; }
  body.uw-site .hamburger {
    display: block; position: static; order: 2;
    font-size: 1.6rem; line-height: 1; padding: 6px 8px; color: #fff;
  }
  body.uw-site .side-buttons {
    position: static; transform: none; order: 3; z-index: auto;
    flex-direction: row; flex-wrap: wrap; gap: 6px; margin-inline-start: auto;
  }
  body.uw-site .side-btn { padding: 5px 12px; font-size: 0.85rem; white-space: nowrap; }
  body.uw-site .nav {
    display: none; position: absolute; top: 100%; inset-inline: 0; width: 100%;
    background: rgba(10, 10, 35, 0.97); padding: 12px 0; z-index: 999;
  }
  body.uw-site .nav.active { display: block; }
  body.uw-site .nav ul { flex-direction: column; align-items: center; margin: 0; }
  body.uw-site .nav ul li { margin: 6px 0; font-size: 1.25rem; }
  body.uw-site .nav ul li a { display: block; padding: 6px 14px; }

  /* Hero + prayer-times table: fixed 8-column layout that always fits. */
  body.uw-site .hero { padding: 4vh 8px; }
  body.uw-site .hero-content h1 { font-size: clamp(2rem, 11vw, 3.4rem); margin-bottom: 3vh; }
  body.uw-site .hero-content p, body.uw-site #current-date {
    font-size: 1rem; line-height: 1.9; overflow-wrap: anywhere;
  }
  body.uw-site .hero-content pre { white-space: pre-wrap; font-size: 0.95rem; }
  body.uw-site #location-name { font-size: 1rem; overflow-wrap: anywhere; }
  body.uw-site #prayer-times-table { max-width: 100%; }
  body.uw-site #prayer-times-table table { table-layout: fixed; width: 100%; border-spacing: 2px; }
  body.uw-site #prayer-times-table th {
    font-size: 0.6rem !important; line-height: 2; text-align: center;
    padding: 4px 1px !important; white-space: normal !important; overflow-wrap: anywhere;
  }
  body.uw-site #prayer-times-table td {
    font-size: 0.68rem !important; line-height: 1.5; text-align: center;
    padding: 4px 1px !important; white-space: normal !important; overflow-wrap: anywhere;
  }
  body.uw-site .footer-upper, body.uw-site .ftr { flex-wrap: wrap; }
}
@media (max-width: 380px) {
  body.uw-site #prayer-times-table th { font-size: 0.54rem !important; }
  body.uw-site #prayer-times-table td { font-size: 0.62rem !important; }
  body.uw-site .side-btn { padding: 4px 9px; font-size: 0.8rem; }
}

/* Homepage footer on phones: the page's own mobile rules set footer
   columns to width:175% with a 50px gap and vw-sized share button, which
   squeezed/overflowed the three footer groups. Stack them centred instead. */
@media (max-width: 860px) {
  body.uw-site .footer { padding: 26px 16px 20px; }
  body.uw-site .footer-content { max-width: 100%; }
  body.uw-site .footer-upper {
    flex-direction: column; align-items: center; gap: 20px; margin-bottom: 16px;
  }
  body.uw-site .ftr {
    flex-direction: column; align-items: center; gap: 12px; width: 100%;
  }
  body.uw-site .footer-column {
    width: 100%; min-width: 0; flex: none; padding: 0;
  }
  body.uw-site .footer-right h3 { font-size: 2.1rem; line-height: 1.6; }
  body.uw-site .footer-center h5 { font-size: 1rem; margin: 0 0 8px; }
  body.uw-site .share-button {
    font-size: 1rem; padding: 8px 22px; gap: 8px; border-radius: 8px; margin: 0 auto;
  }
  body.uw-site .footer-left h4 { font-size: 1.35rem; margin-bottom: 8px; }
  body.uw-site .contact-methods {
    flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px 22px;
  }
  body.uw-site .contact-methods li { font-size: 1.05rem; }
  body.uw-site .contact-methods a { gap: 6px; }
  body.uw-site .footer-lower p { font-size: 0.85rem; line-height: 1.9; }
}

/* Homepage hero location line ("⇊ … کے اوقات ⇊"): the global pre rule
   above (overflow-x:auto) turns this one-line <pre> into a scroll box —
   with the tall Nastaliq glyphs it gains a vertical scrollbar and the
   text is clipped. It is a heading line, not code: never scroll it, and
   give the script a generous line height. Applies at every width. */
body.uw-site .hero-content pre {
  overflow: visible; white-space: pre-wrap; line-height: 2.4; max-width: 100%;
}
