/* ==========================================================================
   BetSlip Converter — Mobile-First Dark Design System
   Loaded LAST so it overrides bootstrap.min.css + main.css.
   Implements the DS spec: Inter type, Phosphor icons, #121212 surfaces,
   #4CAF50 primary, 12/16px radii, button/input/card/tab components.
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  /* Surfaces / background */
  --bg-base:        #121212;
  --surface-1:      #1E1E1E;
  --surface-2:      #2A2A2A;
  --surface-3:      #333333;

  /* Brand */
  --primary:        #4CAF50;
  --primary-pressed:#388E3C;
  --primary-tint:   rgba(76,175,80,0.12);
  --secondary:      #2196F3;
  --secondary-pressed:#1976D2;
  --secondary-tint: rgba(33,150,243,0.12);
  --telegram:       #229ED9;
  --coin-gold:      #FFC107;

  /* Status */
  --error:          #F44336;
  --error-tint:     rgba(244,67,54,0.12);
  --warning:        #FFB300;

  /* Text */
  --text-primary:   rgba(255,255,255,0.87);
  --text-secondary: rgba(255,255,255,0.60);
  --text-disabled:  rgba(255,255,255,0.38);
  --text-on-primary:#FFFFFF;

  /* Lines / overlays */
  --divider:        rgba(255,255,255,0.12);
  --scrim:          rgba(0,0,0,0.60);
  --overlay-press:  rgba(255,255,255,0.08);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Elevation (dark theme: mostly surface tinting) */
  --shadow-float: 0 8px 24px rgba(0,0,0,0.40);

  /* ---- Compatibility aliases: re-skin legacy main.css variables ---- */
  --primary-dark:     var(--primary-pressed);
  --primary-glow:     rgba(76,175,80,0.22);
  --primary-subtle:   var(--primary-tint);
  --primary-border:   rgba(76,175,80,0.28);
  --bg-card:          var(--surface-1);
  --bg-card-alt:      var(--surface-2);
  --bg-section:       #171717;
  --bg-section-alt:   var(--bg-base);
  --bg-input:         var(--surface-1);
  --primary-green:    var(--primary);
  --dark-bg:          var(--bg-base);
  --primary-dark-orig:var(--primary-pressed);
  --secondary-blue:   var(--secondary);

  /* Layout */
  --ds-gutter: 20px;
  --ds-tabbar-h: 64px;
}

/* ---------- 2. Base ------------------------------------------------------ */
/* Tell the browser to render native controls (select popups, scrollbars,
   date pickers) in dark mode so option text stays visible. */
:root { color-scheme: dark; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro', 'Segoe UI', sans-serif;
  background: var(--bg-base) !important;
  color: var(--text-primary);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { color: var(--text-primary); font-family: inherit; }
h1 { font-weight: 700; letter-spacing: -0.2px; }
h2 { font-weight: 600; letter-spacing: -0.1px; }
h3 { font-weight: 600; }

p { color: var(--text-secondary); }

a { color: var(--secondary); }
a:hover { color: var(--secondary-pressed); }

hr, .dropdown-divider { border-color: var(--divider); }

::selection { background: var(--primary-tint); }

/* Section backgrounds inherited from legacy classes */
.section, section { background: var(--bg-base); }
.bg-alt, .bg-section { background: var(--bg-section) !important; }

/* ---------- 3. Buttons --------------------------------------------------- */
.btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  transition: background-color .15s ease, transform .08s ease, border-color .15s ease;
}
.btn:active { transform: scale(0.98); }

/* Primary — green fill */
.btn-convert-bookie,
.hero-cta-primary,
.btn-login,
.btn-primary,
.btn-convert,
.btn-alt {
  background: var(--primary) !important;
  color: var(--text-on-primary) !important;
  border: none !important;
}
.btn-convert-bookie:hover,
.hero-cta-primary:hover,
.btn-login:hover,
.btn-primary:hover,
.btn-convert:hover,
.btn-alt:hover {
  background: var(--primary-pressed) !important;
  color: #fff !important;
}
.btn:disabled,
.btn.disabled {
  background: var(--surface-2) !important;
  color: var(--text-disabled) !important;
  cursor: not-allowed;
  transform: none;
}

/* Secondary — outlined */
.btn-outline,
.hero-cta-ghost,
.btn-outline-primary,
.btn-secondary {
  background: transparent !important;
  color: var(--secondary) !important;
  border: 1.5px solid var(--secondary) !important;
}
.btn-outline:hover,
.hero-cta-ghost:hover,
.btn-secondary:hover {
  background: var(--secondary-tint) !important;
  color: var(--secondary) !important;
}

/* Telegram brand button */
.btn-telegram {
  background: var(--telegram) !important;
  color: #fff !important;
  border: none !important;
}
.btn-telegram:hover { background: #1E8BC0 !important; color:#fff !important; }

/* Danger / logout */
.btn-danger, .text-danger { color: var(--error) !important; }
.btn-danger { background: var(--error) !important; color: #fff !important; }

/* ---------- 4. Inputs ---------------------------------------------------- */
.form-control,
.form-select,
textarea.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea {
  min-height: 56px;
  background: var(--surface-1) !important;
  border: 1px solid var(--divider) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-primary) !important;
  font-family: inherit;
  font-size: 16px;
  padding: 14px 16px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea.form-control, textarea { min-height: 120px; }

.form-control::placeholder,
textarea::placeholder,
input::placeholder { color: var(--text-secondary) !important; opacity: 1; }

.form-control:focus,
.form-select:focus,
select:focus,
textarea:focus,
input:focus {
  border: 2px solid var(--primary) !important;
  box-shadow: none !important;
  outline: none !important;
  background: var(--surface-1) !important;
  color: var(--text-primary) !important;
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff99' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}
.form-select option,
select option {
  background: var(--surface-1) !important;
  color: var(--text-primary) !important;
}
.form-select option:checked,
select option:checked { background: var(--surface-2) !important; }
.form-select option:disabled,
select option:disabled { color: var(--text-disabled) !important; }

.form-label { color: var(--text-secondary); font-size: 12px; font-weight: 600; letter-spacing: 0.2px; margin-bottom: 8px; }

.is-invalid, .form-control.error { border: 1.5px solid var(--error) !important; }
.invalid-feedback, .error-text { color: var(--error); font-size: 12px; }

/* ---------- 5. Cards ----------------------------------------------------- */
.card,
.converter-wrapper,
.hero-card,
.single-footer,
.pricing-style,
.pricing-table .single-table,
.feature-card,
.service-item {
  background: var(--surface-1);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
}
.card { color: var(--text-primary); }
.converter-wrapper { padding: 20px; }

.converter-info,
.info-box {
  background: var(--surface-2);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  padding: 12px 16px;
}
.converter-info strong { color: var(--text-primary); }

/* chip / badge */
.badge { border-radius: var(--radius-sm); font-weight: 600; }
.bg-success { background: var(--primary) !important; }

/* ---------- 5b. Converter From/To selector chips ------------------------ */
.converter-form .form-group { margin-bottom: 0; }

/* Eyebrow "FROM" / "TO" labels */
.converter-form .form-label {
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* The select styled as a selector chip */
.converter-form .form-select {
  min-height: 56px;
  background-color: var(--surface-2) !important;
  border: 1px solid var(--divider) !important;
  border-radius: var(--radius-md) !important;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary) !important;
  padding: 14px 44px 14px 16px;
  cursor: pointer;
}
.converter-form .form-select:hover { border-color: rgba(255,255,255,0.22) !important; }
.converter-form .form-select:focus {
  border: 2px solid var(--primary) !important;
  background-color: var(--surface-2) !important;
}
/* invalid = same bookmaker both sides (JS may add .is-invalid) */
.converter-form .form-select.is-invalid { border: 1.5px solid var(--error) !important; }

/* Center swap / conversion arrow as a round chip button */
.converter-form .conversion-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 auto;
  border-radius: var(--radius-pill);
  background: var(--surface-1);
  border: 1px solid var(--divider);
  color: var(--primary);
}
.converter-form .conversion-arrow i { font-size: 1.35rem !important; }

/* Desktop: drop the arrow to line up with the select row (below the label) */
@media (min-width: 768px) {
  .converter-form .conversion-arrow { margin-top: 28px; }
}

/* On mobile the arrow points down between stacked chips */
@media (max-width: 767.98px) {
  .converter-form .conversion-arrow { margin: 12px auto; transform: rotate(90deg); }
}

/* ---------- 5c. Vanilla Select widget (JS-enhanced From/To) -------------
   assets/js/main.js builds its own DOM with hard-coded light inline styles.
   These rules use !important to re-skin it dark (inline styles set by the
   JS are non-!important, so these win). ---------------------------------- */
.vanilla-select-wrapper { width: 100% !important; }

.vanilla-select-display {
  min-height: 56px !important;
  padding: 14px 16px !important;
  background: var(--surface-2) !important;
  border: 1px solid var(--divider) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-primary) !important;
  font-size: 16px;
  font-weight: 600;
}
.vanilla-select-display:hover { border-color: rgba(255,255,255,0.22) !important; }
/* value / placeholder text */
.vanilla-select-display > span:first-child {
  color: var(--text-primary) !important;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* bookmaker logo chip (dropdown options + selected value) */
.vs-logo {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  object-fit: contain;
  background: #fff;
  padding: 2px;
  flex-shrink: 0;
}
/* caret arrow */
.vanilla-select-display > span:last-child { color: var(--text-secondary) !important; }

/* dropdown panel */
.vanilla-select-dropdown {
  background: var(--surface-1) !important;
  border: 1px solid var(--divider) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-float) !important;
  margin-top: 6px !important;
}
/* search box inside dropdown */
.vanilla-select-dropdown input {
  background: var(--surface-2) !important;
  color: var(--text-primary) !important;
  border: none !important;
  border-bottom: 1px solid var(--divider) !important;
  border-radius: var(--radius-sm) !important;
  min-height: 40px !important;
  margin: 8px 12px !important;
  width: calc(100% - 24px) !important;
}
.vanilla-select-dropdown input::placeholder { color: var(--text-secondary) !important; }

/* options */
.vanilla-option {
  color: var(--text-primary) !important;
  border-top: 1px solid var(--divider) !important;
  font-size: 15px !important;
  display: flex !important;
  align-items: center;
  gap: 10px;
}
.vanilla-option:hover { background: var(--surface-2) !important; color: var(--text-primary) !important; }
.vanilla-option.selected { background: var(--primary) !important; color: #fff !important; }
.vanilla-option.disabled-option { color: var(--text-disabled) !important; opacity: 1 !important; }

.vanilla-no-results { color: var(--text-secondary) !important; border-top: 1px solid var(--divider) !important; }

/* ---------- 6. Top app bar (header) ------------------------------------- */
.header.navbar-area {
  background: var(--surface-1) !important;
  border-bottom: 1px solid var(--divider);
  box-shadow: none;
  z-index: 1080 !important; /* keep header + its dropdowns above page content */
}
/* Lift the desktop "More" submenu and profile dropdown above the header's
   own off-screen mobile drawer (z-index:1050) and page sections. */
.navbar-nav .nav-item .sub-menu { z-index: 1085 !important; }
.user-profile-dropdown .dropdown-menu,
.navbar-area .dropdown-menu { z-index: 1090 !important; }

/* The global `section, .container { overflow-x:hidden }` rule computes
   overflow-y to `auto`, which CLIPS the header dropdowns (they read as
   hidden behind the hero). Restore visible overflow for the header. */
.header.navbar-area,
.header.navbar-area .container,
.header.navbar-area .nav-inner,
.header.navbar-area .navbar { overflow: visible !important; }
.header.navbar-area.sticky {
  background: var(--surface-1) !important;
  backdrop-filter: none;
}
.navbar-nav > .nav-item > a { color: var(--text-secondary) !important; font-weight: 500; }
.navbar-nav > .nav-item > a.active,
.navbar-nav > .nav-item > a:hover { color: var(--primary) !important; }
.sub-menu-bar, .mobile-menu-cta, .dropdown-menu {
  background: var(--surface-1) !important;
  border: 1px solid var(--divider) !important;
}
.dropdown-item { color: var(--text-secondary) !important; }
.dropdown-item:hover { background: var(--overlay-press) !important; color: var(--text-primary) !important; }
.user-name { color: var(--text-primary); }
.avatar-placeholder { background: var(--primary); color: #fff; }

/* ---------- 7. Hero ------------------------------------------------------ */
.hero-highlight, .hero-eyebrow, .stat-num { color: var(--primary) !important; }
.hero-blob-1 { background: radial-gradient(circle, rgba(76,175,80,0.20), transparent 70%) !important; }
.hero-blob-2 { background: radial-gradient(circle, rgba(33,150,243,0.16), transparent 70%) !important; }
.trust-badge, .hero-stat-divider { color: var(--text-secondary); }
.demo-convert-icon { color: var(--primary); }

/* ---------- 8. Footer ---------------------------------------------------- */
.footer, .footer.section { background: var(--surface-1); }
.footer-top { background: var(--surface-1); border-top: 1px solid var(--divider); }
.footer .single-footer { background: transparent; border: none; }
.footer h3, .footer h4 { color: var(--text-primary); }
.footer p, .footer a { color: var(--text-secondary); }
.footer a:hover { color: var(--primary); }
.footer .social a { color: var(--text-secondary); }
.footer .social a:hover { color: var(--primary); }
.copyright-area { background: var(--bg-base); border-top: 1px solid var(--divider); }
.copyright-text, .copyright-owner { color: var(--text-secondary); }

/* ==========================================================================
   9. Mobile install banner (dismissible smart banner)
   ========================================================================== */
.app-install-banner {
  display: none;
  align-items: center;
  gap: 12px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--divider);
  padding: 10px 16px;
}
.app-install-banner .aib-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--primary-tint); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.app-install-banner .aib-text { flex: 1; min-width: 0; line-height: 1.25; }
.app-install-banner .aib-title { color: var(--text-primary); font-size: 14px; font-weight: 600; display: block; }
.app-install-banner .aib-sub { color: var(--text-secondary); font-size: 12px; display: block; }
.app-install-banner .aib-cta {
  background: var(--primary); color: #fff; font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: var(--radius-pill); text-decoration: none; flex-shrink: 0;
}
.app-install-banner .aib-close {
  background: none; border: none; color: var(--text-secondary);
  font-size: 22px; line-height: 1; padding: 4px 6px; flex-shrink: 0; cursor: pointer;
}

/* ==========================================================================
   10. Mobile bottom tab bar
   ========================================================================== */
.mobile-tabbar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--ds-tabbar-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface-1);
  border-top: 1px solid var(--divider);
  z-index: 1040;
}
.mobile-tabbar ul {
  display: flex; height: var(--ds-tabbar-h); margin: 0; padding: 0; list-style: none;
}
.mobile-tabbar li { flex: 1; }
.mobile-tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; height: 100%; color: var(--text-secondary); text-decoration: none;
}
.mobile-tabbar a i { font-size: 24px; }
.mobile-tabbar a span { font-size: 11px; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; }
.mobile-tabbar a.active { color: var(--primary); }

/* ==========================================================================
   11. Responsive — mobile-first reveal / desktop hide
   ========================================================================== */
@media (max-width: 767.98px) {
  .app-install-banner { display: flex; }
  .mobile-tabbar { display: block; }
  body { padding-bottom: calc(var(--ds-tabbar-h) + env(safe-area-inset-bottom, 0px)); }

  /* full-width primary CTAs on mobile */
  .btn-convert-bookie,
  .hero-cta-primary,
  .btn-login,
  .btn-telegram { width: 100%; }

  /* comfortable gutters */
  .container, .container-fluid { padding-left: var(--ds-gutter); padding-right: var(--ds-gutter); }
}

@media (min-width: 768px) {
  .app-install-banner,
  .mobile-tabbar { display: none !important; }
}

/* ==========================================================================
   12. Dashboard (app shell: sidebar + tab content)
   The tab-content classes below (.stats-card, .quick-actions, .action-btn,
   .units-display, .transaction-item, .badge-channel) had NO styling — this
   section gives the dashboard its full look.
   ========================================================================== */

/* --- Shell tweaks --- */
.dashboard-container { background: var(--bg-base); }
.dashboard-nav { background: var(--surface-1); border-right: 1px solid var(--divider); }
.main-content { background: var(--bg-base); }
@media (min-width: 992px) {
  .main-content.mt-5 { margin-top: 0 !important; }   /* sticky sidebar: no extra gap */
}
@media (max-width: 991.98px) {
  .main-content { padding-top: 64px; }               /* clear the fixed toggle button */
  .main-content.mt-5 { margin-top: 0 !important; }
}

/* Page heading inside a tab */
.tab-content > h1, .tab-content .h3 { color: var(--text-primary); font-weight: 700; }

/* --- Cards --- */
.stats-card,
.dashboard-card {
  background: var(--surface-1);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 20px;
  color: var(--text-primary);
}
.stats-card h5, .stats-card h6, .dashboard-card h5 { color: var(--text-primary); }
.stats-card .text-muted, .text-muted { color: var(--text-secondary) !important; }
.dashboard-card:hover { border-color: var(--primary-border); }

/* Hero balance card (Available Units) */
.stats-card--hero {
  background: linear-gradient(135deg, #1E1E1E 0%, #173A1E 100%);
  border: 1px solid var(--primary-border);
}
.stats-card--hero .units-display {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}
.stats-card--hero .units-display i { color: var(--coin-gold); font-size: 28px; }

/* --- Units stat display --- */
.unit-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.units-display {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--primary);
  margin: 6px 0 2px;
}

/* --- Quick actions grid --- */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 768px) { .quick-actions { grid-template-columns: repeat(4, 1fr); } }
.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 104px;
  padding: 18px 12px;
  background: var(--surface-1);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  transition: border-color .15s ease, background-color .15s ease, transform .08s ease;
}
.action-btn i { font-size: 26px; color: var(--primary); }
.action-btn:hover {
  border-color: var(--primary);
  background: var(--primary-tint);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* --- Progress (daily reward streak) --- */
.progress { background: var(--surface-2); border-radius: var(--radius-pill); overflow: hidden; }
.progress-bar, .progress-bar.bg-success { background: var(--primary) !important; }

/* --- Transactions --- */
.transaction-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
}
.transaction-item:last-child { border-bottom: none; }
.transaction-item h6 { color: var(--text-primary); font-size: 14px; font-weight: 600; }
.transaction-positive { color: var(--primary); font-weight: 700; }
.transaction-negative { color: var(--error); font-weight: 700; }

.list-group, .list-group-flush { background: transparent; }
.list-group-item { background: transparent !important; border-color: var(--divider) !important; color: var(--text-primary); }

/* --- Badges (dashboard + orders) --- */
.badge { border-radius: var(--radius-pill); font-weight: 700; padding: 4px 10px; }
.badge-channel {
  background: var(--primary-tint); color: var(--primary);
  border: 1px solid var(--primary-border);
}
.badge.bg-success { background: var(--primary) !important; color: #fff !important; }
.badge.bg-info    { background: var(--secondary) !important; color: #fff !important; }
.badge.bg-warning { background: var(--warning) !important; color: #000 !important; }
.badge.bg-secondary { background: var(--surface-2) !important; color: var(--text-secondary) !important; }
.badge.bg-danger  { background: var(--error) !important; color: #fff !important; }
.badge.bg-dark    { background: var(--surface-3) !important; color: var(--text-primary) !important; }

/* --- Tables (orders / history) --- */
.table { color: var(--text-secondary); margin-bottom: 0; }
.table > :not(caption) > * > * {
  background: transparent;
  color: inherit;
  border-bottom-color: var(--divider);
  padding: 12px 14px;
}
.table thead th {
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  font-weight: 600;
  border-bottom: 1px solid var(--divider);
}
.table tbody td { color: var(--text-primary); font-size: 14px; vertical-align: middle; }
.table-hover > tbody > tr:hover > * { background: var(--overlay-press) !important; }

/* --- Bootstrap modals used across dashboard tabs --- */
.modal-content {
  background: var(--surface-1);
  border: 1px solid var(--divider);
  border-radius: var(--radius-xl);
  color: var(--text-primary);
}
.modal-header, .modal-footer { border-color: var(--divider); }
.modal-title { color: var(--text-primary); font-weight: 600; }
.modal-body .text-muted, .modal small.text-muted { color: var(--text-secondary) !important; }
.btn-close { filter: invert(1) grayscale(1) brightness(1.6); opacity: .7; }
.btn-close:hover { opacity: 1; }

/* ==========================================================================
   13. Bootstrap component dark overrides
   Themes the components used across Account / Settings tabs, pricing cards,
   auth pages: alerts, outline buttons, form switches, input groups, cards.
   ========================================================================== */

/* --- Alerts --- */
.alert {
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 14px;
}
.alert-success { background: var(--primary-tint); border-color: var(--primary-border); color: var(--primary); }
.alert-info    { background: var(--secondary-tint); border-color: rgba(33,150,243,0.28); color: #79c0ff; }
.alert-warning { background: rgba(255,179,0,0.12); border-color: rgba(255,179,0,0.30); color: var(--warning); }
.alert-danger  { background: var(--error-tint); border-color: rgba(244,67,54,0.30); color: #ff8a80; }
.alert-light   { background: var(--surface-2); border-color: var(--divider) !important; color: var(--text-secondary); }
.alert-light .text-muted, .alert-light small { color: var(--text-secondary) !important; }

/* --- Outline buttons --- */
.btn-outline-success { background: transparent !important; color: var(--primary) !important; border: 1.5px solid var(--primary) !important; }
.btn-outline-success:hover { background: var(--primary-tint) !important; color: var(--primary) !important; }
.btn-outline-primary { background: transparent !important; color: var(--secondary) !important; border: 1.5px solid var(--secondary) !important; }
.btn-outline-primary:hover, .btn-outline-info:hover { background: var(--secondary-tint) !important; }
.btn-outline-info { background: transparent !important; color: var(--secondary) !important; border: 1.5px solid var(--secondary) !important; }
.btn-outline-danger { background: transparent !important; color: #ff8a80 !important; border: 1.5px solid var(--error) !important; }
.btn-outline-danger:hover { background: var(--error-tint) !important; color: #ff8a80 !important; }
.btn-outline-warning { background: transparent !important; color: var(--warning) !important; border: 1.5px solid var(--warning) !important; }
.btn-outline-warning:hover { background: rgba(255,179,0,0.12) !important; }
.btn-outline-secondary { background: transparent !important; color: var(--text-secondary) !important; border: 1.5px solid var(--divider) !important; }
.btn-outline-secondary:hover { background: var(--overlay-press) !important; color: var(--text-primary) !important; }

/* Neutral fill secondary (modal "Cancel") */
.btn-secondary { background: var(--surface-2) !important; border: 1px solid var(--divider) !important; color: var(--text-primary) !important; }
.btn-secondary:hover { background: var(--surface-3) !important; color: var(--text-primary) !important; }

/* --- Form check / switch --- */
.form-check-input {
  background-color: var(--surface-2);
  border: 1px solid var(--divider);
}
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-tint); }
.form-check-label { color: var(--text-primary); }

/* --- Input group --- */
.input-group-text {
  background: var(--surface-2);
  border: 1px solid var(--divider);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
}

/* --- Cards (generic Bootstrap) --- */
.card { background: var(--surface-1); border: 1px solid var(--divider); border-radius: var(--radius-lg); color: var(--text-primary); }
.card-body { color: var(--text-primary); }
.card-title, .card-subtitle, .card h5, .card h6 { color: var(--text-primary); }
.card-subtitle.text-muted { color: var(--text-secondary) !important; }
.card .list-group-item { padding-top: 8px; padding-bottom: 8px; }

/* --- Text / bg / border utility remaps (Bootstrap semantics on dark) --- */
.text-success { color: var(--primary) !important; }
.text-primary { color: var(--secondary) !important; }
.text-info    { color: var(--secondary) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger  { color: #ff8a80 !important; }
.badge.bg-primary { background: var(--secondary) !important; color: #fff !important; }
.border, .border-top { border-color: var(--divider) !important; }
.border-primary { border-color: var(--primary-border) !important; }
.border-warning { border-color: rgba(255,179,0,0.40) !important; }
.border-danger  { border-color: rgba(244,67,54,0.40) !important; }
.bg-light, .bg-white { background: var(--surface-2) !important; }

/* ==========================================================================
   14. Large-screen body gutters
   Pull page content in from the viewport edges on lg+ so sections don't look
   stretched edge-to-edge. Mobile/tablet keep their existing full-width layout.
   ========================================================================== */
@media (min-width: 992px) {
  body { padding-left: 40px; padding-right: 40px; }
}
@media (min-width: 1400px) {
  body { padding-left: 72px; padding-right: 72px; }
}

/* ==========================================================================
   15. Sponsored dual banners
   Two sponsor cards side-by-side; stack + inner items go column on sm.
   ========================================================================== */
.sponsor-grid { display: flex; gap: 14px; }
.sponsor-grid > .in-content-ad { flex: 1 1 0; min-width: 0; margin: 0; }

.ad-bookie-logo {
  height: 34px; width: auto;
  border-radius: 6px;
  background: #fff;
  padding: 3px;
  flex-shrink: 0;
}
.ad-code {
  display: inline-block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--primary);
  background: var(--primary-tint);
  border: 1px dashed var(--primary-border);
  border-radius: 6px;
  padding: 2px 8px;
}

/* Small screens: horizontal swipeable carousel so cards aren't cut off */
@media (max-width: 575.98px) {
  .sponsor-grid {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 12px;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;               /* Firefox */
  }
  .sponsor-grid::-webkit-scrollbar { display: none; } /* Chrome/Safari */
  .sponsor-grid > .in-content-ad {
    flex: 0 0 88%;                       /* one card at a time, next one peeks */
    max-width: 88%;
    scroll-snap-align: center;
  }
  .in-content-ad > a {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 10px;
    height: 100%;
  }
  .in-content-ad .ad-btn { width: 100%; text-align: center; }
}

/* ==========================================================================
   16. Contact page (contactus.php)  — all these classes were unstyled
   ========================================================================== */
.contact-container { max-width: 1000px; margin: 0 auto; padding: 40px 20px 8px; }
.contact-info h2 { font-size: 22px; font-weight: 700; margin-bottom: 20px; }

.contact-methods {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) { .contact-methods { grid-template-columns: 1fr 1fr; } }

.contact-method {
  display: flex;
  gap: 14px;
  background: var(--surface-1);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: border-color .15s ease, transform .08s ease;
}
.contact-method:hover { border-color: var(--primary-border); transform: translateY(-2px); }
.contact-icon {
  width: 48px; height: 48px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--primary-tint);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.contact-details { min-width: 0; }
.contact-details h3 { font-size: 16px; font-weight: 600; color: var(--text-primary); margin: 0 0 4px; }
.contact-details p  { font-size: 13px; color: var(--text-secondary); margin: 0 0 6px; }
.contact-link {
  color: var(--secondary);
  font-weight: 600;
  font-size: 14px;
  word-break: break-word;
}
.contact-link:hover { color: var(--secondary-pressed); }
.response-time { font-size: 12px; color: var(--text-disabled) !important; }

.social-links { display: flex; gap: 8px; margin-top: 10px; }
.social-link {
  width: 38px; height: 38px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: background-color .15s ease, color .15s ease;
}
.social-link.whatsapp:hover { background: #25D366; color: #fff; }
.social-link.telegram:hover { background: var(--telegram); color: #fff; }
.social-link.x:hover { background: #fff; color: #000; }

/* FAQ (contact + reused) */
.faq-section { max-width: 1000px; margin: 0 auto; padding: 24px 20px 60px; }
.faq-section > h2 { text-align: center; font-size: 22px; font-weight: 700; margin-bottom: 24px; }
.faq-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 768px) { .faq-grid { grid-template-columns: 1fr 1fr; } }
.faq-item {
  background: var(--surface-1);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.faq-question { font-weight: 600; font-size: 15px; color: var(--text-primary); margin-bottom: 8px; }
.faq-answer { font-size: 13px; line-height: 1.6; color: var(--text-secondary); }

/* ==========================================================================
   17. Contact hero illustration (contactus.php)
   The floating-card illustration classes were unstyled, so the cards piled
   on top of each other. Lay them out as a responsive 2-col card grid.
   ========================================================================== */
.hero-image { display: flex; justify-content: center; width: 100%; }
.contact-illustration {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 480px;
}
.floating-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-1);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  min-width: 0;
}
.floating-card .card-icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--primary-tint);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.whatsapp-card .card-icon { background: rgba(37,211,102,0.15); color: #25D366; }
.telegram-card .card-icon { background: rgba(34,158,217,0.15); color: var(--telegram); }
.twitter-card  .card-icon { background: var(--surface-2); color: var(--text-primary); }
.floating-card .card-content { min-width: 0; flex: 1; }
.floating-card .card-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.floating-card .card-detail {
  font-size: 11px; color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.floating-card .card-link { color: var(--text-secondary); flex-shrink: 0; font-size: 14px; }

/* Decorative-only pieces have no layout styling — hide to avoid clutter */
.support-person, .connection-line, .bg-element { display: none !important; }

/* Give the illustration breathing room when it stacks under the copy */
@media (max-width: 991.98px) { .contact-illustration { margin: 24px auto 0; } }
@media (max-width: 400px)   { .contact-illustration { grid-template-columns: 1fr; } }
