/* Shared styles, loaded first on every page: public site, admin panel and the
   login/setup pages. A rule used on more than one surface belongs here; a rule
   for one surface goes in that surface's own file. Which files each layout
   loads, and in what order, is set by STYLESHEET_BUNDLES in
   helpers/functions.php. */

/* Brand palette. Only exact matches of these values use the variables;
   near-shades (#f26522, #ff9a3c, ...) are deliberately left as literals.
   The guide-css block (in admin/panel.css) keeps literals: GuideExporter
   inlines it into standalone HTML without this :root. */
:root {
  --rm-orange: #f08143;
  --rm-orange-rgb: 240, 129, 67;
  --rm-orange-hover: #d96b2a;
  --rm-orange-tint: #fff5f0;
  --rm-cyan: #66c3d0;
  --rm-cyan-rgb: 102, 195, 208;
  --rm-ink: #1e2130;
}

body {
  font-family: "Raleway", sans-serif !important;
  background-color: white;
}

/* ── Suppress browser-native password reveal button ─────────────────────
   Edge / IE add a built-in eye icon inside <input type="password">.
   Chrome (newer) can also add one via :-webkit-credentials-auto-fill-button.
   Both clash visually with our custom input-group toggle button.         */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}
input[type="password"]::-webkit-credentials-auto-fill-button {
  visibility: hidden;
  pointer-events: none;
  position: absolute;
}

/* for slider images */
.img-wrapper {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px;

}

.img-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.card-footer {
  box-shadow: rgba(0, 0, 0, 0.1) 0px 2px;
  background: rgb(238, 238, 238);
}

.bi-chevron-down {
  transition: transform 0.3s ease;
}

.orange-text {
  color: var(--rm-orange) !important;
}
/* contribute table css */

/* For mobile view — stacked label/value cards. Tables driven by DataTables
   Responsive (.dt-responsive) are excluded: they hide low-priority columns
   and expand them on tap instead, which conflicts with this card layout. */
@media screen and (max-width: 767px) {
  .table:not(.dt-responsive) thead {
    display: none;
    /* hide table header */
  }

  /* Neutralize Bootstrap's per-cell borders so our card borders below are
     the only ones drawn. */
  .table:not(.dt-responsive) > :not(caption) > * > * {
    border-bottom-width: 0 !important;
    box-shadow: none !important;
  }

  .table:not(.dt-responsive) tr {
    display: block;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow: hidden;
  }

  .table:not(.dt-responsive) td {
    display: grid;
    grid-template-columns: 38% 62%;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #f1f3f5 !important;
    padding: 0.55rem 0.75rem !important;
  }

  .table:not(.dt-responsive) td:last-child {
    border-bottom: none !important;
  }

  .table:not(.dt-responsive) td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.78rem;
    color: #6b7280;
    border-right: none !important;
    padding-left: 0 !important;
  }

  /* Section rows stay full width */
  .table:not(.dt-responsive) .section {
    display: block;
    padding: 0.75rem;
    border: none;
    background: #e9ecef;
  }

  .table:not(.dt-responsive) td:empty,
  .table:not(.dt-responsive) td[data-empty="1"] {
    display: none !important;
    border: none !important;
    padding: 0 !important;
  }

  /* Most admin tables never set data-label at all — without this, the
     38% label column above is still reserved as dead space in front of
     every value (badges, buttons, etc. all shifted right for no reason).
     Collapse those cells to a single column instead. */
  .table:not(.dt-responsive) td:not([data-label]) {
    grid-template-columns: 1fr;
  }

  /* Icon-only action buttons/links inside a table cell — across the admin
     pages these carry a handful of different bespoke classes
     (.admin-icon-btn, .rm-vlist-icon, plain .btn-sm, etc.), each sized for
     a dense desktop row. One shared floor here instead of fixing each
     page's CSS separately. */
  .table:not(.dt-responsive) td .btn,
  .table:not(.dt-responsive) td a.btn,
  .table:not(.dt-responsive) td button.btn,
  .table:not(.dt-responsive) td .admin-icon-btn,
  .table:not(.dt-responsive) td .rm-vlist-icon {
    min-width: 34px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
  }
  .table:not(.dt-responsive) td .d-inline-flex {
    gap: 8px !important;
  }
}

/* Event image wrapper — fixed height, letterbox with blur backdrop */
.rm-event-img-wrap {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a1a;
  width: 100%;
  height: 180px;
}
.rm-event-img-wrap .carousel-item,
.rm-event-img-wrap .img-wrapper {
  height: 100%;
  padding: 0;
}
.rm-event-img-wrap .img-wrapper {
  position: relative;
  overflow: hidden;
}
/* Blurred backdrop: same image scaled + blurred, fills the letterbox area */
.rm-event-img-wrap .img-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--rm-img-bg);
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.7);
  transform: scale(1.15);
  z-index: 0;
}
.rm-event-img-wrap .img-wrapper img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}
.rm-progress-line {
  width: 40px;
  height: 2px;
  background: #e0e0e0;
  margin: 0 6px;
}
/* ── Seat Grid: row label (size+color only; layout utilities in HTML) ──── */
.rm-row-label {
  font-size: 0.85rem;
  color: var(--rm-ink);
  min-width: 28px;
}
/* ── Individual Seat (size, radius, font-size, cursor, transition only;
       layout utilities like d-flex / align-items / justify-content / p-0 /
       fw-bold are applied as Bootstrap classes in HTML).
       Default border reset here so state classes can apply their own borders
       (we can't use Bootstrap's .border-0 because it uses !important and
       would block the state borders) */
.rm-seat {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 5px;
  font-size: 0.6rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
/* ── Seat Page Responsive ───────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .rm-progress-line {
    width: 24px;
  }
}
@media (max-width: 575.98px) {
  .rm-seat {
    width: 28px;
    height: 28px;
    font-size: 0.6rem;
  }
  .rm-row-label {
    font-size: 0.75rem;
    min-width: 22px;
    margin-right: 6px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   Auth Pages (Login / Register / Password Reset)
   ══════════════════════════════════════════════════════════════════════════ */
.text-center > div > a > svg {
  filter: invert(0.2);
}
.text-center h1 {
  color: #333;
  letter-spacing: 0.5px;
}
.text-center > p {
  color: #999;
}

/* ═══════════════════════════════════════════════════════════════════════
   PRINT STYLES — applied when the user runs window.print() (Save as PDF)
   on a receipt page (success / failed / pending).

   Goal: preserve the receipt card EXACTLY as it appears on screen
   (white card, rounded corners, soft shadow, all internal styling).
   Only the site chrome (nav, footer, hero, progress steps, the print
   button itself) is hidden.
   ═══════════════════════════════════════════════════════════════════════ */
@media print {
  /* Page format: A4 with safe margins */
  @page {
    size: A4;
    margin: 1cm;
  }

  /* Force colors to print as-shown (orange brand, success greens, etc.) */
  body,
  * {
    -webkit-print-color-adjust: exact !important;
            print-color-adjust: exact !important;
  }

  /* Keep the light page background (matches the on-screen rm-page-bg) so the
     white card visually pops the same way it does on screen */
  body {
    background: #f4f6fb;
  }

  /* Hide site chrome but DO NOT touch anything inside the receipt card */
  .rm-no-print,
  nav.navbar,
  .navbar,
  .site-footer,
  footer,
  .rm-page-hero,
  #printReceiptButton,
  .modal,
  .toast,
  .alert-dismissible .btn-close {
    display: none !important;
  }

  /* Hide the booking progress steps row (it's redundant in a saved receipt) */
  .site-content > .container:first-of-type > .d-flex.justify-content-center {
    display: none !important;
  }

  /* Remove the top padding the progress steps left behind */
  .site-content > .container.pt-3 {
    padding-top: 0 !important;
  }

  /* Tighten the page-bg wrapper so the card sits nicely on the printed page */
  .rm-page-bg,
  .site-content {
    padding: 0 !important;
    background: #f4f6fb !important;
  }

  /* Avoid splitting the receipt card across pages */
  .bg-white.border.rounded-4 {
    page-break-inside: avoid;
  }

  /* Don't append the full URL after links (browser default in some setups) */
  a[href]::after {
    content: none !important;
  }
}


/* ── Test-server ribbon ─────────────────────────────────────────────────────
   Rendered only when APP_ENV=test-server (see views/partials/shared/test-ribbon.php).
   Top-left corner triangle. Fixed position, pointer-events:none so it never
   blocks clicks. Uses clamp() for mobile → laptop → desktop scaling.        */
.test-ribbon-wrap {
    position: fixed;
    top: 0;
    left: 0;
    width: clamp(130px, 26vw, 200px);
    height: clamp(130px, 26vw, 200px);
    overflow: hidden;
    pointer-events: none;
    z-index: 2000;
}
.test-ribbon {
    position: absolute;
    top: clamp(30px, 7vw, 50px);
    left: clamp(-70px, -14vw, -50px);
    width: clamp(180px, 36vw, 260px);
    transform: rotate(-45deg);
    background: linear-gradient(180deg, rgba(220, 53, 69, 0.55), rgba(176, 42, 55, 0.55));
    color: #fff;
    text-align: center;
    padding: clamp(6px, 1.2vw, 10px) 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.20);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    font-family: 'Raleway', sans-serif;
    line-height: 1.2;
}
.test-ribbon .lbl  { font-size: clamp(10px, 1.5vw, 13px); font-weight: 700; letter-spacing: 1px; }
.test-ribbon .ver  { font-size: clamp(9px,  1.3vw, 12px); opacity: 0.95; }
.test-ribbon .date { font-size: clamp(8px,  1.1vw, 11px); opacity: 0.85; }

@media (max-width: 576px) {
    .test-ribbon { box-shadow: none; }
}

