/* ==========================================================================
   SG Lobang Club — brand styles
   Layered on top of Bootstrap 5.3. Singapore-inspired red + gold accents.
   All custom classes are namespaced sglc-* to avoid clashing with Bootstrap.
   ========================================================================== */

:root {
  --sglc-red:      #d7263d;   /* Singapore red          */
  --sglc-red-dark: #b51d31;
  --sglc-gold:     #f4b400;   /* "lobang" / value gold  */
  --sglc-ink:      #1f2733;   /* headings / strong text */
  --sglc-bg:       #f7f8fa;   /* page background        */
}

body {
  background: var(--sglc-bg);
  color: var(--sglc-ink);
}

a { color: var(--sglc-red); }
a:hover { color: var(--sglc-red-dark); }

/* ---- Navbar ------------------------------------------------------------- */
.sglc-nav {
  background: #ffffff;
  border-bottom: 3px solid var(--sglc-red);
  box-shadow: 0 1px 6px rgba(0, 0, 0, .06);
}
.sglc-nav .navbar-brand { color: var(--sglc-ink); }
.sglc-nav .nav-link { color: #455; font-weight: 500; }
.sglc-nav .nav-link:hover,
.sglc-nav .nav-link:focus { color: var(--sglc-red); }

/* "SG" mark used in the brand + footer */
.sglc-logo {
  display: inline-block;
  background: var(--sglc-red);
  color: #fff;
  font-weight: 700;
  border-radius: 6px;
  padding: 0 .35em;
  letter-spacing: .5px;
}

/* Points pill in the navbar */
.sglc-points {
  background: rgba(244, 180, 0, .15);
  color: #8a6d00;
  border: 1px solid rgba(244, 180, 0, .5);
  border-radius: 999px;
  padding: .15rem .6rem;
  font-weight: 600;
  font-size: .85rem;
}

/* ---- Primary button ----------------------------------------------------- */
.btn-sglc {
  background: var(--sglc-red);
  border-color: var(--sglc-red);
  color: #fff;
  font-weight: 600;
}
.btn-sglc:hover,
.btn-sglc:focus {
  background: var(--sglc-red-dark);
  border-color: var(--sglc-red-dark);
  color: #fff;
}
.btn-sglc:active { background: var(--sglc-red-dark) !important; }

/* ---- Hero --------------------------------------------------------------- */
.sglc-hero {
  background: linear-gradient(135deg, var(--sglc-red) 0%, #e8556b 100%);
  color: #fff;
}
.sglc-hero .lead { color: rgba(255, 255, 255, .92); }
.sglc-hero-link {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .6);
}
.sglc-hero-link:hover { color: var(--sglc-gold); }

/* ---- Cards -------------------------------------------------------------- */
.sglc-card {
  border: 1px solid #eceef1;
  transition: transform .12s ease, box-shadow .12s ease;
}
.sglc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .1) !important;
}

/* ---- Filters panel ------------------------------------------------------ */
.sglc-filters {
  border: 1px solid #eceef1;
  position: sticky;
  top: 84px;
}
@media (max-width: 991.98px) {
  .sglc-filters { position: static; }
}

/* ---- Admin sub-nav ------------------------------------------------------ */
.sglc-admin-nav .nav-link {
  color: #455;
  background: #fff;
  border: 1px solid #e3e6ea;
}
.sglc-admin-nav .nav-link.active {
  background: var(--sglc-red);
  border-color: var(--sglc-red);
  color: #fff;
}

/* ---- Footer ------------------------------------------------------------- */
.sglc-footer {
  background: var(--sglc-ink);
  color: #cfd6df;
}
.sglc-footer .sglc-logo { background: var(--sglc-gold); color: var(--sglc-ink); }
.sglc-logo-img { width: 1.7em; height: 1.7em; border-radius: 7px; flex: 0 0 auto; }
.sglc-foot-link { color: #fff; text-decoration: none; }
.sglc-foot-link:hover { color: var(--sglc-gold); }

/* ---- Misc --------------------------------------------------------------- */
.text-warning { color: var(--sglc-gold) !important; }

/* Make sticky navbar offset anchor jumps (e.g. #tag42 on admin/tags.php) */
:target { scroll-margin-top: 90px; }

/* ---- Card meta (hearts / views) ---------------------------------------- */
.sglc-card-meta { white-space: nowrap; }

/* ---- Share: floating button, overlay, toast ---------------------------- */
.sglc-share-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1045;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem .95rem;
  border: 0;
  border-radius: 999px;
  background: var(--sglc-red);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
  cursor: pointer;
}
.sglc-share-fab:hover,
.sglc-share-fab:focus { background: var(--sglc-red-dark); }
.sglc-share-fab svg { display: block; }

body.sglc-noscroll { overflow: hidden; }

.sglc-share-overlay {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 20, 28, .55);
}
.sglc-share-overlay[hidden] { display: none; }
.sglc-share-panel {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}
.sglc-share-list { display: flex; flex-direction: column; gap: .6rem; }
.sglc-share-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: .7rem .9rem;
  border: 1px solid #e3e7ee;
  border-radius: 10px;
  background: #fff;
  color: var(--sglc-ink);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}
.sglc-share-item:hover,
.sglc-share-item:focus { border-color: var(--sglc-red); color: var(--sglc-ink); }
.sglc-share-item svg { width: 22px; height: 22px; flex: 0 0 22px; }
.sglc-share-item.is-copied { border-color: #198754; color: #198754; }

.sglc-share-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1060;
  max-width: 340px;
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .22);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
}
.sglc-share-toast[hidden] { display: none; }
.sglc-share-toast.is-shown { opacity: 1; transform: translateY(0); }

/* ---- Opening hours ------------------------------------------------------ */
.sglc-hours-editor .sglc-hours-row { min-height: 38px; }
.sglc-hours-editor input[type="time"] { max-width: 150px; }
.sglc-hours .d-flex { padding: 1px 0; }
.sglc-hours .d-flex + .d-flex { border-top: 1px solid #eef0f3; }

/* ---- Add chooser cards -------------------------------------------------- */
.sglc-choose { transition: transform .12s ease, box-shadow .12s ease; }
.sglc-choose:hover { transform: translateY(-3px); box-shadow: 0 .6rem 1.4rem rgba(0,0,0,.1) !important; }
.sglc-choose-ico { font-size: 2rem; line-height: 1; }

/* ---- Detail hero -------------------------------------------------------- */
.sglc-detail-hero {
  position: relative;
  padding: 1.5rem 1.6rem;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--sglc-red) 0%, #9c1828 100%);
  box-shadow: 0 10px 28px rgba(183,29,49,.22);
  overflow: hidden;
}
.sglc-detail-hero.is-listing {
  background: linear-gradient(135deg, #1f2733 0%, #394656 100%);
  box-shadow: 0 10px 28px rgba(31,39,51,.25);
}
.sglc-detail-hero::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 180px; height: 180px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
}
.sglc-eyebrow {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .9;
}
.sglc-detail-title {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.1;
}
.sglc-stats { display: flex; flex-wrap: wrap; gap: .5rem; position: relative; z-index: 1; }
.sglc-stat {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: .28rem .7rem;
  font-size: .9rem;
  font-weight: 600;
  backdrop-filter: blur(2px);
}
.sglc-stat .sglc-stat-sub { font-weight: 400; opacity: .85; font-size: .8rem; }
.sglc-stat .badge { background: transparent !important; padding: 0; font-size: .9rem; }
.sglc-stat-deal { background: rgba(244,180,0,.28); border-color: rgba(244,180,0,.5); }

/* ---- Type-ahead menu ---------------------------------------------------- */
.sglc-ta-menu {
  border: 1px solid #d9dee6;
  border-radius: 10px;
  margin-top: .25rem;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.sglc-ta-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  padding: .5rem .75rem;
  font-size: .95rem;
}
.sglc-ta-item:hover, .sglc-ta-item:focus { background: #f4f1ec; }

/* ---- Notification bell badge ------------------------------------------- */
.sglc-bell-badge {
  position: absolute;
  top: 2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: .65rem;
  line-height: 16px;
  font-weight: 700;
  text-align: center;
  color: #fff;
  background: #d62828;
  border-radius: 999px;
}
.sglc-phone, .sglc-wa { white-space: nowrap; text-decoration: none; }
.sglc-wa { margin-left: .35rem; }

/* ---- Member photo gallery strip + lightbox -------------------------- */
.sglc-photo-strip { display: flex; gap: 8px; height: 350px; }
.sglc-photo-tile {
  position: relative; flex: 1 1 0; min-width: 0; height: 100%;
  border: 0; padding: 0; border-radius: 12px; overflow: hidden; cursor: pointer;
  background-size: cover; background-position: center; background-color: #e9ecef;
}
.sglc-photo-tile:focus-visible { outline: 3px solid var(--sglc-red); outline-offset: 2px; }
.sglc-photo-like {
  position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px;
  background: rgba(0,0,0,.55); color: #fff; border-radius: 999px; padding: 3px 10px;
  font-size: .85rem; cursor: pointer; user-select: none;
}
.sglc-photo-like .heart { color: #ff8095; line-height: 1; }
.sglc-photo-like[data-liked="1"] .heart { color: #ff2d55; }
.sglc-photo-more {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; background: rgba(0,0,0,.5); color: #fff; font-weight: 600; padding: 8px;
}
@media (max-width: 575.98px) { .sglc-photo-strip { height: 220px; gap: 6px; } }

.sglc-lb { position: fixed; inset: 0; z-index: 1080; background: rgba(0,0,0,.9);
  display: none; flex-direction: column; align-items: center; justify-content: center; }
.sglc-lb img { max-width: 92vw; max-height: 76vh; border-radius: 8px; }
.sglc-lb-cap { color: #eee; margin-top: 10px; max-width: 90vw; text-align: center; }
.sglc-lb-count { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); color: #fff; font-size: .9rem; }
.sglc-lb-x { position: absolute; top: 8px; right: 18px; color: #fff; font-size: 2.2rem; background: none; border: 0; cursor: pointer; line-height: 1; }
.sglc-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.15);
  color: #fff; border: 0; font-size: 2rem; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; }
.sglc-lb-prev { left: 14px; } .sglc-lb-next { right: 14px; }
.sglc-lb-like { margin-top: 12px; background: rgba(255,255,255,.15); color: #fff; border: 0;
  border-radius: 999px; padding: 8px 18px; cursor: pointer; font-size: 1rem; }
.sglc-lb-like[data-liked="1"] { background: #ff2d55; }

/* ---- Gallery uploader (add/edit) ----------------------------------- */
.gu-drop { border: 2px dashed #c9ced6; border-radius: 12px; padding: 18px; text-align: center; cursor: pointer; color: #6c757d; background: #fff; }
.gu-drop.gu-over { border-color: var(--sglc-red); background: #fff5f6; color: var(--sglc-ink); }
.gu-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.gu-tile { position: relative; width: 120px; height: 90px; border-radius: 8px; overflow: hidden; border: 1px solid #dee2e6; cursor: grab; background: #f1f3f5; }
.gu-tile img { width: 100%; height: 100%; object-fit: cover; }
.gu-tile.gu-drag { opacity: .4; }
.gu-feat { position: absolute; left: 4px; top: 4px; background: var(--sglc-gold); color: #1f2733; font-size: .7rem; font-weight: 700; border-radius: 6px; padding: 1px 6px; }
.gu-x { position: absolute; right: 3px; top: 3px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; line-height: 1; cursor: pointer; }

/* ---- Carousel viewer (detail) -------------------------------------- */
.sglc-carousel { margin-bottom: 1.5rem; }
.sgc-main { position: relative; background: #f1f3f5; border-radius: 14px; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 280px; }
.sgc-stage { width: 100%; display: flex; align-items: center; justify-content: center; padding: 8px; }
.sgc-img { max-width: 100%; max-height: 460px; object-fit: contain; border-radius: 8px; transition: opacity .25s ease; display: block; }
.sgc-img.fade { opacity: 0; }
.sgc-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; z-index: 2; }
.sgc-prev { left: 10px; } .sgc-next { right: 10px; }
.sgc-like { position: absolute; right: 10px; bottom: 10px; border: 0; border-radius: 999px; background: rgba(0,0,0,.55); color: #fff; padding: 5px 12px; cursor: pointer; }
.sgc-like[data-liked="1"] { background: #ff2d55; }
.sgc-dots { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.sgc-dot { width: 9px; height: 9px; border-radius: 50%; background: #ccd2da; border: 0; cursor: pointer; padding: 0; }
.sgc-dot.active { background: var(--sglc-red); }
.sgc-thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; padding-bottom: 4px; }
.sgc-thumb { flex: 0 0 auto; width: 84px; height: 64px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: #f1f3f5; padding: 0; }
.sgc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sgc-thumb.active { border-color: var(--sglc-red); }
.sgc-cap { text-align: center; color: #6c757d; font-size: .9rem; margin-top: 8px; }
.sgc-onlyone .sgc-arrow, .sgc-onlyone .sgc-dots, .sgc-onlyone .sgc-thumbs { display: none !important; }
@media (max-width: 575.98px) { .sgc-img { max-height: 300px; } .sgc-arrow { width: 38px; height: 38px; font-size: 1.3rem; } .sgc-thumb { width: 64px; height: 48px; } }

/* Keep the detail sidebar (rating, details, claim, hours) in view on desktop. */
@media (min-width: 992px) {
  .sglc-side { position: sticky; top: 1rem; align-self: flex-start; padding-top: 57px; }
}

/* Rich-text editor surface: show list markers + paragraph spacing while editing. */
.sglc-rt-ed { line-height: 1.5; }
.sglc-rt-ed:focus { outline: 0; border-color: var(--sglc-red); box-shadow: 0 0 0 .2rem rgba(215,38,61,.15); }
.sglc-rt-ed p { margin: 0 0 .5rem; }
.sglc-rt-ed ul { padding-left: 1.25rem; list-style: disc; margin: 0 0 .5rem; }
.sglc-rt-ed ol { padding-left: 1.25rem; list-style: decimal; margin: 0 0 .5rem; }
.sglc-rt-ed:empty::before { content: "Describe what makes this worth it…"; color: #adb5bd; }

/* Structured AI descriptions: keep H2/H3 readable (not oversized) in the
   editor and on the public listing page. */
.sglc-rt-ed h2, .sglc-desc h2 { font-size: 1.25rem; font-weight: 700; margin: 1rem 0 .4rem; }
.sglc-rt-ed h3, .sglc-desc h3 { font-size: 1.05rem; font-weight: 700; margin: .85rem 0 .35rem; }
.sglc-rt-ed h2:first-child, .sglc-desc h2:first-child { margin-top: 0; }
.sglc-desc ul, .sglc-desc ol { padding-left: 1.25rem; }
.sglc-desc p { margin-bottom: .6rem; }
.sglc-desc li { margin-bottom: .2rem; }

/* Listing/place card featured image */
.sglc-card-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.sglc-card-img-square { aspect-ratio: 1 / 1; }
