/* Stonebridge consultation modal instant — 2026-08-28 */
:root {
  --sbcm-gold: #c9a46b;
  --sbcm-gold-bright: #e1c38b;
  --sbcm-ink: #050504;
  --sbcm-panel: #0b0a08;
  --sbcm-border: rgba(201, 164, 107, .34);
}

html.sb-consult-modal-open,
body.sb-consult-modal-open {
  overflow: hidden !important;
}

.sb-consult-modal {
  width: min(1120px, calc(100vw - 48px));
  height: min(900px, calc(100dvh - 48px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: #f2e8d8;
  border: 1px solid var(--sbcm-border);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 0%, rgba(201, 164, 107, .08), transparent 29%),
    linear-gradient(145deg, #0d0c0a 0%, var(--sbcm-ink) 58%, #090806 100%);
  box-shadow: 0 38px 120px rgba(0, 0, 0, .72), inset 0 1px 0 rgba(255, 255, 255, .035);
  opacity: 0;
  transform: translateY(12px) scale(.992);
  transition: opacity .2s ease, transform .24s cubic-bezier(.2, .8, .2, 1);
  z-index: 2147483600;
}

.sb-consult-modal[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.sb-consult-modal[data-visible="1"] {
  opacity: 1;
  transform: none;
}

.sb-consult-modal::backdrop {
  background: rgba(2, 2, 2, .82);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.sb-consult-modal-head {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 18px 15px 22px;
  border-bottom: 1px solid rgba(201, 164, 107, .22);
  background: linear-gradient(90deg, rgba(255, 255, 255, .025), rgba(255, 255, 255, .008));
}

.sb-consult-modal-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.sb-consult-modal-logo {
  width: 46px;
  height: 58px;
  flex: 0 0 46px;
  display: block;
  object-fit: contain;
  object-position: center;
}

.sb-consult-modal-copy {
  min-width: 0;
}

.sb-consult-modal-copy strong {
  display: block;
  color: #f4eadc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.012em;
}

.sb-consult-modal-copy span {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: #b9ad9b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .13em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.sb-consult-modal-close {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  position: relative;
  border: 1px solid rgba(201, 164, 107, .3);
  border-radius: 50%;
  color: #eadbc4;
  background: rgba(255, 255, 255, .025);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.sb-consult-modal-close::before,
.sb-consult-modal-close::after {
  content: "";
  width: 17px;
  height: 1px;
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 2px;
  background: currentColor;
}

.sb-consult-modal-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.sb-consult-modal-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.sb-consult-modal-close:hover { border-color: rgba(225, 195, 139, .68); background: rgba(201, 164, 107, .09); }
.sb-consult-modal-close:active { transform: scale(.96); }
.sb-consult-modal-close:focus-visible { outline: 2px solid var(--sbcm-gold); outline-offset: 3px; }

.sb-consult-modal-stage {
  min-height: 0;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  isolation: isolate;
  background:
    linear-gradient(115deg, rgba(3, 3, 2, .79), rgba(6, 5, 3, .72) 54%, rgba(3, 3, 2, .81)),
    url('/assets/images/stonebridge-bridge-approved-4k.webp') center 42% / cover no-repeat;
  scrollbar-width: thin;
  scrollbar-color: rgba(181, 139, 75, .9) #090806;
  scrollbar-gutter: stable;
}

.sb-consult-modal-stage::-webkit-scrollbar {
  width: 11px;
}

.sb-consult-modal-stage::-webkit-scrollbar-track {
  background: #090806;
  border-left: 1px solid rgba(201, 164, 107, .16);
}

.sb-consult-modal-stage::-webkit-scrollbar-thumb {
  min-height: 74px;
  border: 2px solid #090806;
  border-radius: 999px;
  background: linear-gradient(180deg, #d0ad72, #8d6837);
  box-shadow: inset 0 0 0 1px rgba(255, 238, 198, .18);
}

.sb-consult-modal-stage::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #e1c38b, #a77b40);
}

.sb-consult-modal-stage::-webkit-scrollbar-corner {
  background: #090806;
}

.sb-consult-modal-stage::-webkit-scrollbar-button {
  width: 0;
  height: 0;
  display: none;
}

.sb-consult-modal-frame {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: block;
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  opacity: 0;
  transition: opacity .2s ease;
}

.sb-consult-modal[data-loaded="1"] .sb-consult-modal-frame { opacity: 1; }

.sb-consult-modal-loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #c9b99f;
  background:
    radial-gradient(circle at 50% 15%, rgba(201, 164, 107, .07), transparent 34%),
    #050504;
  transition: opacity .18s ease, visibility .18s ease;
}

.sb-consult-modal-loader div {
  display: grid;
  justify-items: center;
  gap: 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.sb-consult-modal-loader i {
  width: 32px;
  height: 32px;
  display: block;
  border: 1px solid rgba(201, 164, 107, .22);
  border-top-color: var(--sbcm-gold-bright);
  border-radius: 50%;
  animation: sbcm-spin .75s linear infinite;
}

.sb-consult-modal[data-loaded="1"] .sb-consult-modal-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes sbcm-spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  .sb-consult-modal {
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .sb-consult-modal-head {
    min-height: 72px;
    gap: 14px;
    padding: 12px 12px 12px 15px;
  }
  .sb-consult-modal-identity { gap: 12px; }
  .sb-consult-modal-logo {
    width: 37px;
    height: 47px;
    flex-basis: 37px;
  }
  .sb-consult-modal-copy strong { font-size: 18px; }
  .sb-consult-modal-copy span { display: none; }
  .sb-consult-modal-close {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }
  .sb-consult-modal-stage { background-position: center, 58% center; }
}

@media (prefers-reduced-motion: reduce) {
  .sb-consult-modal,
  .sb-consult-modal-frame,
  .sb-consult-modal-loader,
  .sb-consult-modal-close { transition: none !important; }
  .sb-consult-modal-loader i { animation-duration: 1.4s; }
}
