/* ==========================================================================
   Softbnb — locale modals (language / currency)
   Shared by the premium homepage and the property page themes, so both open
   the same dialog. Needs css/softbnb-ds.css for the --sb-* tokens, which
   resolve on .sb-modal in light and dark mode.

   Bootstrap's default chrome was showing through: square corners, a red X,
   plain form buttons. These rules replace the presentation only; the modal
   is still opened and closed by Bootstrap, and the handler classes on each
   option are untouched.
   ========================================================================== */

.sb-modal { --sb-modal-ease: cubic-bezier(0.16, 1, 0.3, 1); }

.sb-modal .modal-dialog {
  max-width: 560px;
  margin-inline: auto;
  padding-inline: var(--sb-4);
}
.sb-modal.modal-lg .modal-dialog,
.sb-modal .modal-dialog.modal-lg { max-width: 760px; }

/* Entrance: rise and settle, rather than Bootstrap's straight slide. */
.sb-modal.fade .modal-dialog {
  transform: translateY(24px) scale(0.97);
  opacity: 0;
  transition: transform 420ms var(--sb-modal-ease), opacity 260ms ease;
}
.sb-modal.show .modal-dialog { transform: none; opacity: 1; }

.sb-modal__content {
  background: var(--sb-surface);
  border: 1px solid var(--sb-border);
  border-radius: var(--sb-r-xl);
  box-shadow: var(--sb-shadow-3);
  overflow: hidden;
  color: var(--sb-text);
  font-family: var(--sb-font-body);
}

.sb-modal__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--sb-4);
  padding: var(--sb-6) var(--sb-6) var(--sb-4);
}
.sb-modal__eyebrow {
  font-size: var(--sb-t-caption);
  font-weight: var(--sb-w-medium); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sb-gold); margin: 0 0 6px;
}
.sb-modal__title {
  font-family: var(--sb-font-display);
  font-size: clamp(2.24rem, 2.6vw, 2.96rem);
  font-weight: var(--sb-w-normal); letter-spacing: -0.012em; line-height: 1.15;
  color: var(--sb-ink); margin: 0;
}

.sb-modal__close {
  flex: none;
  width: 40px; height: 40px; border-radius: var(--sb-r-pill);
  display: flex; align-items: center; justify-content: center;
  background: var(--sb-surface-2);
  border: 1px solid var(--sb-border);
  color: var(--sb-muted);
  font-size: var(--sb-t-small); cursor: pointer; opacity: 1;
  transition: background 200ms var(--sb-ease), color 200ms var(--sb-ease),
              transform 200ms var(--sb-ease);
}
.sb-modal__close:hover {
  background: var(--sb-ink); border-color: var(--sb-ink);
  color: var(--sb-surface); transform: rotate(90deg);
}

.sb-modal__body { padding: 0 var(--sb-6) var(--sb-6); }

/* ── Option grid ────────────────────────────────────────────────────────── */
.sb-optgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sb-3);
}
.sb-optgrid--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 767.98px) {
  .sb-optgrid, .sb-optgrid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 419.98px) {
  .sb-optgrid, .sb-optgrid--wide { grid-template-columns: 1fr; }
}

.sb-opt {
  position: relative;
  display: flex; align-items: center; gap: var(--sb-3);
  padding: 14px var(--sb-4);
  min-height: 56px;
  border: 1px solid var(--sb-border);
  border-radius: var(--sb-r-md);
  background: var(--sb-surface);
  color: var(--sb-text); text-decoration: none;
  transition: border-color 200ms var(--sb-ease), background 200ms var(--sb-ease),
              transform 260ms var(--sb-ease-out), box-shadow 260ms var(--sb-ease);
}
.sb-opt:hover {
  border-color: var(--sb-border-strong);
  background: var(--sb-surface-2);
  color: var(--sb-text); text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--sb-shadow-1);
}
.sb-opt__label { font-size: var(--sb-t-small); font-weight: var(--sb-w-medium); line-height: 1.3; }
.sb-opt__sub   { font-size: var(--sb-t-caption); color: var(--sb-muted); }
.sb-opt__stack { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sb-opt__sym {
  flex: none;
  width: 38px; height: 38px; border-radius: var(--sb-r-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--sb-surface-2);
  font-size: 1.52rem; font-weight: var(--sb-w-bold); color: var(--sb-ink);
}

/* Selected state — brand border plus a check, not just a colour change. */
.sb-opt.is-active {
  border-color: var(--sb-primary-strong);
  background: var(--sb-primary-soft);
}
.sb-opt.is-active .sb-opt__label { color: var(--sb-primary-strong); }
.sb-opt.is-active .sb-opt__sym { background: rgba(230, 51, 56, 0.14); color: var(--sb-primary-strong); }
.sb-opt__check {
  margin-left: auto; flex: none;
  width: 22px; height: 22px; border-radius: var(--sb-r-pill);
  display: flex; align-items: center; justify-content: center;
  background: var(--sb-primary-strong); color: #fff; font-size: 10px;
  opacity: 0; transform: scale(0.6);
  transition: opacity 200ms var(--sb-ease), transform 320ms var(--sb-ease-out);
}
.sb-opt.is-active .sb-opt__check { opacity: 1; transform: scale(1); }

/* Backdrop: darker and blurred so the dialog reads as foreground. */
.modal-backdrop.show { opacity: 0.55; background: #14100E; }

@media (prefers-reduced-motion: reduce) {
  .sb-modal.fade .modal-dialog { transition: opacity 150ms linear; transform: none; }
  .sb-modal__close:hover { transform: none; }
  .sb-opt:hover { transform: none; }
}
