/* Bridge: pages whose markup is still the old theme's, inside the new design (admin preview only).
   The markup and scripts are untouched, so every form, code check and upload keeps working;
   this file only redraws the old pieces with the new design's tokens. Everything is scoped
   to body.sr-bridge, which only exists when the new design is switched on. */

/* 1. Old theme variables → new design tokens (the old CSS reads these everywhere) */
body.sr-bridge {
  --border_radius: 12px;
  --border_color: 231, 229, 242;
  --inner_border_color: 214, 211, 230;
  --text_color: 29, 27, 44;
  --text_muted_color: 119, 116, 141;
  --background_color: 245, 244, 252;
  --inner_background_color: 248, 247, 253;
  --elements_inner_background_color: 248, 247, 253;
  --bs-border-color: var(--sr-border);
  --bs-body-color: var(--sr-text);
  --bs-secondary-color: var(--sr-muted);
  --bs-link-color-rgb: 107, 92, 231;
  --bs-primary-rgb: 107, 92, 231;
  background: var(--sr-bg); color: var(--sr-text); padding-top: 0 !important;
}

/* 2. Type */
body.sr-bridge, body.sr-bridge .btn, body.sr-bridge .form-control, body.sr-bridge .form-select, body.sr-bridge h1, body.sr-bridge h2, body.sr-bridge h3,
body.sr-bridge h4, body.sr-bridge h5, body.sr-bridge h6, body.sr-bridge .tooltip, body.sr-bridge .dropdown-menu, body.sr-bridge input, body.sr-bridge textarea,
body.sr-bridge select, body.sr-bridge .modal, body.sr-bridge .toastr, body.sr-bridge .popover {
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif !important;
}
body.sr-bridge h1, body.sr-bridge h2, body.sr-bridge h3, body.sr-bridge h4, body.sr-bridge h5, body.sr-bridge h6 { color: var(--sr-text); font-weight: 800; letter-spacing: 0; }
body.sr-bridge .text-muted { color: var(--sr-muted) !important; }
body.sr-bridge a.link-primary, body.sr-bridge .link-primary { color: var(--sr-primary) !important; font-weight: 700; text-decoration: none; }
body.sr-bridge .text-primary { color: var(--sr-primary) !important; }

/* 3. Page header band (layouts with a title strip) and sections */
body.sr-bridge .header.header-sm { min-height: 0; background: linear-gradient(180deg, var(--sr-surface), var(--sr-bg)); border-bottom: 1px solid var(--sr-border); }
body.sr-bridge .header.header-sm .header-inner { padding-block: 28px; }
body.sr-bridge .header.header-sm h1, body.sr-bridge .header.header-sm .header-title { color: var(--sr-text) !important; font-size: clamp(22px, 3vw, 30px); }
body.sr-bridge .header.header-sm p, body.sr-bridge .header.header-sm .header-text { color: var(--sr-text-2) !important; }
body.sr-bridge .header.header-sm .breadcrumb { font-size: 12px; }
body.sr-bridge .header.header-sm .breadcrumb a { color: var(--sr-muted); }
body.sr-bridge .section { padding-top: 24px; }
body.sr-bridge .container-custom-xs { max-width: 760px; }

/* 4. Boxes and cards */
body.sr-bridge .box, body.sr-bridge .item-box, body.sr-bridge .card {
  background: var(--sr-surface); border: 1px solid var(--sr-border) !important; border-radius: var(--sr-radius-lg) !important; box-shadow: var(--sr-shadow);
}
body.sr-bridge .box.box-bg { background: var(--sr-surface-2); box-shadow: none; }
body.sr-bridge .card-header { background: transparent; border-bottom: 1px solid var(--sr-border); padding: 16px 20px; font-weight: 800; }
body.sr-bridge .card-header:first-child { border-radius: var(--sr-radius-lg) var(--sr-radius-lg) 0 0; }
body.sr-bridge .card-body, body.sr-bridge .item-box-body { padding: 20px; }
body.sr-bridge .card-footer { background: var(--sr-surface-2); border-top: 1px solid var(--sr-border); }

/* 5. Buttons */
body.sr-bridge .btn { border-radius: var(--sr-radius-sm); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
body.sr-bridge .btn:focus-visible { box-shadow: 0 0 0 4px var(--sr-primary-100); outline: none; }
body.sr-bridge .btn-md { min-height: 46px; padding: 10px 18px; }
body.sr-bridge .btn-lg { min-height: 52px; padding: 12px 22px; font-size: 17px; }
body.sr-bridge .btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13px; border-radius: 9px; }
body.sr-bridge .btn-primary { background: var(--sr-primary); border-color: var(--sr-primary); color: #fff; }
body.sr-bridge .btn-primary:hover, body.sr-bridge .btn-primary:focus { background: var(--sr-primary-600); border-color: var(--sr-primary-600); color: #fff; }
body.sr-bridge .btn-primary:disabled, body.sr-bridge .btn-primary.disabled { background: var(--sr-primary); border-color: var(--sr-primary); opacity: .45; }
body.sr-bridge .btn-secondary { background: var(--sr-pink); border-color: var(--sr-pink); color: #fff; }
body.sr-bridge .btn-outline-primary { color: var(--sr-primary); border: 1.5px solid var(--sr-primary-100); background: var(--sr-surface); }
body.sr-bridge .btn-outline-primary:hover, body.sr-bridge .btn-check:checked + .btn-outline-primary, body.sr-bridge .btn-outline-primary.active { background: var(--sr-primary-50); border-color: var(--sr-primary); color: var(--sr-primary); }
body.sr-bridge .btn-outline-secondary, body.sr-bridge .btn-light { color: var(--sr-text-2); border: 1.5px solid var(--sr-border); background: var(--sr-surface); }
body.sr-bridge .btn-outline-secondary:hover, body.sr-bridge .btn-light:hover, body.sr-bridge .btn-check:checked + .btn-outline-secondary { background: var(--sr-surface-2); color: var(--sr-text); border-color: var(--sr-primary-100); }
body.sr-bridge .btn-soft { background: var(--sr-primary-50); color: var(--sr-primary); border-color: transparent; }
body.sr-bridge .btn-danger { background: var(--sr-red); border-color: var(--sr-red); }
body.sr-bridge .btn-outline-danger { color: var(--sr-red); border: 1.5px solid var(--sr-red-50); background: var(--sr-surface); }
body.sr-bridge .btn-outline-danger:hover { background: var(--sr-red-50); color: var(--sr-red); border-color: var(--sr-red); }
body.sr-bridge .btn-dark { background: var(--sr-navy); border-color: var(--sr-navy); }
body.sr-bridge .btn-link { color: var(--sr-primary); text-decoration: none; font-weight: 700; }
body.sr-bridge .btn-close { border-radius: 8px; }

/* 6. Forms */
body.sr-bridge .form-label { font-weight: 700; font-size: 14px; color: var(--sr-text); margin-bottom: 6px; }
body.sr-bridge .form-control, body.sr-bridge .form-select {
  border: 1.5px solid var(--sr-border); border-radius: var(--sr-radius-sm); background-color: var(--sr-surface); color: var(--sr-text); min-height: 46px; font-size: 15px;
}
body.sr-bridge textarea.form-control { min-height: 110px; line-height: 1.8; }
body.sr-bridge .form-control::placeholder { color: #A9A6BD; }
body.sr-bridge .form-control:focus, body.sr-bridge .form-select:focus { border-color: var(--sr-primary); box-shadow: 0 0 0 4px var(--sr-primary-50); }
body.sr-bridge .form-control:disabled, body.sr-bridge .form-control[readonly] { background-color: var(--sr-surface-2); }
body.sr-bridge .form-control.is-invalid, body.sr-bridge .form-select.is-invalid { border-color: var(--sr-red); }
body.sr-bridge .invalid-feedback { color: var(--sr-red); font-weight: 600; font-size: 13px; }
body.sr-bridge .form-text { color: var(--sr-muted); font-size: 12.5px; }
body.sr-bridge .input-group > .form-control, body.sr-bridge .input-group > .btn, body.sr-bridge .input-group > .input-group-text { min-height: 46px; }
body.sr-bridge .input-group-text { background: var(--sr-surface-2); border: 1.5px solid var(--sr-border); color: var(--sr-text-2); }
body.sr-bridge .form-check-input { width: 1.15em; height: 1.15em; border: 1.5px solid #CFCBE3; }
body.sr-bridge .form-check-input:checked { background-color: var(--sr-primary); border-color: var(--sr-primary); }
body.sr-bridge .form-check-input:focus { box-shadow: 0 0 0 4px var(--sr-primary-50); border-color: var(--sr-primary); }
body.sr-bridge .form-switch .form-check-input { width: 2.4em; }
body.sr-bridge .iti { width: 100%; }

/* 7. Sign in / sign up */
body.sr-bridge .sign { max-width: 480px; margin-inline: auto; }
body.sr-bridge .sign.sign-lg { max-width: 640px; }
body.sr-bridge .sign .box { padding: 28px; }
body.sr-bridge .sign-title { font-weight: 800; font-size: 26px; margin-bottom: 4px; }
body.sr-bridge .sign-text { color: var(--sr-muted); margin: 0; }
body.sr-bridge .login-with-divider { color: var(--sr-muted); font-size: 13px; }
body.sr-bridge .login-with-divider::before, body.sr-bridge .login-with-divider::after { background: var(--sr-border) !important; }
body.sr-bridge .btn-social { border: 1.5px solid var(--sr-border); background: var(--sr-surface); color: var(--sr-text); border-radius: var(--sr-radius-sm); font-weight: 700; min-height: 46px; }
body.sr-bridge .btn-social:hover { border-color: var(--sr-primary-100); background: var(--sr-surface-2); color: var(--sr-text); }
body.sr-bridge .btn-social img { width: 20px; height: 20px; }

/* 8. Alerts, badges, progress, tables, pagination */
body.sr-bridge .alert { border-radius: var(--sr-radius); border: 0; padding: 12px 16px; font-weight: 600; }
body.sr-bridge .alert-success { background: var(--sr-green-50); color: #0E7A50; }
body.sr-bridge .alert-warning { background: var(--sr-amber-50); color: #7A5300; }
body.sr-bridge .alert-danger { background: var(--sr-red-50); color: #B4282D; }
body.sr-bridge .alert-info, body.sr-bridge .alert-primary { background: var(--sr-primary-50); color: var(--sr-primary-600); }
body.sr-bridge .badge { border-radius: var(--sr-pill); font-weight: 700; padding: 5px 10px; }
body.sr-bridge .progress { background: var(--sr-surface-2); border-radius: var(--sr-pill); height: 8px; }
body.sr-bridge .progress-bar { background: var(--sr-primary); border-radius: var(--sr-pill); }
body.sr-bridge .table { --bs-table-bg: transparent; color: var(--sr-text); }
body.sr-bridge .table > :not(caption) > * > * { border-color: var(--sr-border); padding: 12px; }
body.sr-bridge .table thead th { color: var(--sr-muted); font-size: 13px; font-weight: 700; background: var(--sr-surface-2); }
body.sr-bridge .pagination { gap: 6px; flex-wrap: wrap; justify-content: center; }
body.sr-bridge .pagination .page-link { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px !important; border: 1px solid var(--sr-border); color: var(--sr-text); font-weight: 700; }
body.sr-bridge .pagination .page-item.active .page-link { background: var(--sr-primary); border-color: var(--sr-primary); color: #fff; }

/* 9. Tabs, dropdowns, modals */
body.sr-bridge .custom-tabs, body.sr-bridge .nav-tabs { border-bottom: 1px solid var(--sr-border); }
body.sr-bridge .custom-tab { color: var(--sr-muted); font-weight: 700; border-bottom: 3px solid transparent; }
body.sr-bridge .custom-tab:hover { color: var(--sr-text); }
body.sr-bridge .custom-tab.current { color: var(--sr-primary); border-color: var(--sr-primary); }
body.sr-bridge .nav-pills .nav-link { border-radius: var(--sr-pill); font-weight: 700; color: var(--sr-text-2); }
body.sr-bridge .nav-pills .nav-link.active { background: var(--sr-primary); color: #fff; }
body.sr-bridge .dropdown-menu { border: 1px solid var(--sr-border); border-radius: var(--sr-radius); box-shadow: var(--sr-shadow-lg); padding: 6px; }
body.sr-bridge .dropdown-item { border-radius: 8px; padding: 8px 12px; font-weight: 600; }
body.sr-bridge .dropdown-item:hover, body.sr-bridge .dropdown-item:focus { background: var(--sr-primary-50); color: var(--sr-primary); }
body.sr-bridge .modal-content { border: 0; border-radius: var(--sr-radius-lg); box-shadow: var(--sr-shadow-lg); }
body.sr-bridge .modal-header { border-bottom: 1px solid var(--sr-border); padding: 16px 20px; }
body.sr-bridge .modal-title { font-weight: 800; }
body.sr-bridge .modal-footer { border-top: 1px solid var(--sr-border); }


/* 11. Small fixes */
body.sr-bridge .custom-tab.current, body.sr-bridge .mobile-action-bar { font-family: "Cairo", sans-serif; }
body.sr-bridge img { max-width: 100%; }
@media (max-width: 575.98px) {
  body.sr-bridge .sign .box { padding: 20px; }
  body.sr-bridge .card-body, body.sr-bridge .item-box-body { padding: 16px; }
}
body.sr-bridge .border, body.sr-bridge .border-top, body.sr-bridge .border-bottom, body.sr-bridge .border-start, body.sr-bridge .border-end { border-color: var(--sr-border) !important; }
body.sr-bridge .rounded-3 { border-radius: var(--sr-radius) !important; }
body.sr-bridge [data-otp-wrapper] { background: var(--sr-surface-2); }
body.sr-bridge .box .box, body.sr-bridge .card .card, body.sr-bridge .box .card { box-shadow: none; }

/* 12. User area header (themes/sareeh/user/hero) */
body.sr-bridge .sr-uhero { background: linear-gradient(180deg, var(--sr-surface), var(--sr-bg)); border-bottom: 1px solid var(--sr-border); }
.sr-uhero-in { padding-block: 20px 22px; }
.sr-uhero-crumbs:empty { display: none; }
.sr-uhero-crumbs { margin-bottom: 14px; font-size: 12px; }
.sr-uhero-crumbs .breadcrumb { margin: 0; }
.sr-uhero-main { display: flex; align-items: center; gap: 18px; }
.sr-uhero-avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex: none; border: 3px solid var(--sr-surface); box-shadow: var(--sr-shadow); }
.sr-uhero-info { min-width: 0; }
.sr-uhero-name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: clamp(22px, 3vw, 28px); margin: 0 0 8px; }
.sr-uhero-verified { color: var(--sr-primary); display: inline-flex; }
.sr-uhero-verified .sr-icon { width: 22px; height: 22px; }
.sr-uhero-banned { background: var(--sr-red-50); color: var(--sr-red); }
.sr-uhero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sr-uhero-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: var(--sr-pill); background: var(--sr-surface); border: 1px solid var(--sr-border); color: var(--sr-text-2); font-size: 13px; font-weight: 600; text-decoration: none; }
a.sr-uhero-chip:hover { border-color: var(--sr-primary-100); color: var(--sr-primary); }
.sr-uhero-chip .sr-icon { width: 14px; height: 14px; color: var(--sr-muted); }
.sr-uhero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 18px; }
.sr-uhero-stat { background: var(--sr-surface); border: 1px solid var(--sr-border); border-radius: var(--sr-radius); padding: 14px 16px; font-size: 13.5px; color: var(--sr-text-2); }
.sr-uhero-stat p { margin: 0 0 6px; line-height: 1.6; }
.sr-uhero-stat-head { display: flex; align-items: center; gap: 6px; font-weight: 800; color: var(--sr-text); margin-bottom: 6px; }
.sr-uhero-stat-head .sr-icon { color: var(--sr-star); }
.sr-uhero-next { color: var(--sr-primary); }
.sr-uhero-cur { color: var(--sr-text); }
.sr-uhero-max { color: var(--sr-green); font-weight: 700; }
.sr-uhero-bar { height: 8px; border-radius: var(--sr-pill); background: var(--sr-surface-2); overflow: hidden; margin: 8px 0 6px; }
.sr-uhero-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sr-primary), #8B5CF6); }
.sr-uhero-impact, .sr-uhero-reach { display: flex; align-items: flex-start; gap: 10px; }
.sr-uhero-impact { background: var(--sr-amber-50); border-color: #FBE3A6; color: #7A5300; }
.sr-uhero-reach { background: var(--sr-primary-50); border-color: var(--sr-primary-100); color: var(--sr-primary-600); }
.sr-uhero-emoji { font-size: 20px; line-height: 1.3; }
.sr-uhero-tabs { border-bottom: 0; margin-top: -4px; }
.sr-uhero-tabs .sr-tab { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.sr-uhero-tabs .sr-tab .sr-icon { width: 16px; height: 16px; }
@media (max-width: 640px) {
  .sr-uhero-main { flex-direction: column; text-align: center; }
  .sr-uhero-name, .sr-uhero-meta { justify-content: center; }
  .sr-uhero-avatar { width: 76px; height: 76px; }
}
.sr-uhero-nums { display: flex; justify-content: space-between; gap: 8px; }
body.sr-bridge .sr-bridge-crumbs { padding-top: 16px; font-size: 12px; }
body.sr-bridge .sr-bridge-crumbs .breadcrumb { margin: 0; }

/* Write-a-review in steps (sareeh.js) */
body.sr-bridge .sr-step-off { display: none !important; }
body.sr-bridge .sr-steps { padding: 4px 0 14px; }
body.sr-bridge .sr-steps-bar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
body.sr-bridge .sr-steps-bar span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 6px; border-radius: var(--sr-pill); background: var(--sr-surface); border: 1px solid var(--sr-border); color: var(--sr-muted); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
body.sr-bridge .sr-steps-bar span b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--sr-surface-2); font-size: 12px; }
body.sr-bridge .sr-steps-bar span.is-on { background: var(--sr-primary); border-color: var(--sr-primary); color: #fff; }
body.sr-bridge .sr-steps-bar span.is-on b { background: rgba(255,255,255,.22); color: #fff; }
body.sr-bridge .sr-steps-bar span.is-done { color: var(--sr-primary); border-color: var(--sr-primary-100); background: var(--sr-primary-50); }
body.sr-bridge .sr-steps-bar span.is-done b { background: var(--sr-primary); color: #fff; }
body.sr-bridge .sr-steps-nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 16px; }
body.sr-bridge .sr-steps-nav .btn { min-width: 120px; }
body.sr-bridge .sr-steps-nav [data-sr-next] { margin-inline-start: auto; }
body.sr-bridge .sr-steps-nav [hidden] { display: none !important; }
@media (max-width: 575px) {
  body.sr-bridge .sr-steps-bar span { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 2px; border-radius: 12px; }
  body.sr-bridge .sr-steps-nav .btn { flex: 1; min-width: 0; }
}
body.sr-bridge.bg-custom { background-color: var(--sr-bg) !important; }
