.account-opening-hero {
  position: relative;
  overflow: hidden;
  padding: 190px 0 110px;
  background: linear-gradient(90deg, rgba(22, 20, 18, 0.94), rgba(59, 31, 35, 0.86)),
    url("../images/background/page-title.jpg") center / cover no-repeat;
}

.account-opening-hero .content-box {
  position: relative;
  z-index: 1;
}

.account-opening-hero h1 {
  margin: 0 0 28px;
  color: var(--stonegate-ivory) !important;
  font-size: 64px;
  line-height: 1.05;
}

.account-opening-hero .bread-crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.account-opening-hero .bread-crumb li,
.account-opening-hero .bread-crumb a,
.account-opening-hero .bread-crumb span {
  color: var(--stonegate-light-text);
}

.account-opening-hero .bread-crumb a:hover {
  color: var(--stonegate-gold);
}

.account-opening-section {
  padding: 110px 0;
  background: var(--stonegate-ivory);
}

.account-opening-alert {
  max-width: 1120px;
  margin: 0 auto 24px;
  border-radius: 8px;
}

.account-opening-alert-detail {
  display: block;
  margin-top: 6px;
}

.wizard-shell,
.account-opening-card {
  max-width: 1120px;
  margin: 0 auto;
}

.wizard-shell {
  margin-bottom: 24px;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--stonegate-border);
  border-radius: 8px;
  background: var(--stonegate-paper);
  box-shadow: 0 20px 50px rgba(43, 30, 23, 0.08);
}

.wizard-step-tab {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 94px;
  padding: 22px 24px;
  border: 0;
  border-right: 1px solid var(--stonegate-border);
  background: transparent;
  text-align: left;
  cursor: default;
}

.wizard-step-tab:last-child {
  border-right: 0;
}

.wizard-step-tab.is-clickable {
  cursor: pointer;
}

.wizard-step-tab.is-active,
.wizard-step-tab.is-complete {
  background: var(--stonegate-wine);
}

.wizard-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(184, 155, 94, 0.16);
  color: var(--stonegate-chocolate);
  font-weight: 700;
}

.wizard-step-tab.is-active .wizard-step-number,
.wizard-step-tab.is-complete .wizard-step-number {
  background: var(--stonegate-gold);
  color: var(--stonegate-carbon);
}

.wizard-step-copy {
  display: grid;
  gap: 3px;
}

.wizard-step-copy strong {
  color: var(--stonegate-chocolate);
  font-size: 18px;
  line-height: 1.2;
}

.wizard-step-copy span {
  color: var(--stonegate-muted);
  font-size: 14px;
}

.wizard-step-tab.is-active .wizard-step-copy strong,
.wizard-step-tab.is-complete .wizard-step-copy strong {
  color: var(--stonegate-ivory);
}

.wizard-step-tab.is-active .wizard-step-copy span,
.wizard-step-tab.is-complete .wizard-step-copy span {
  color: var(--stonegate-light-text);
}

.account-opening-card {
  padding: 42px;
  border: 1px solid var(--stonegate-border);
  border-radius: 8px;
  background: var(--stonegate-paper);
  box-shadow: 0 24px 70px rgba(43, 30, 23, 0.1);
}

.account-opening-intro {
  max-width: 760px;
  margin-bottom: 34px;
}

.account-opening-intro h2,
.section-block h3 {
  margin-bottom: 12px;
  color: var(--stonegate-chocolate);
}

.account-opening-intro p,
.section-block p,
.file-card small {
  color: var(--stonegate-muted);
}

.wizard-step {
  display: none;
}

.wizard-step.is-active {
  display: block;
}

.section-block {
  padding: 34px 0;
  border-top: 1px solid var(--stonegate-border);
}

.section-block:first-child {
  padding-top: 0;
  border-top: 0;
}

.application-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.field-span-2 {
  grid-column: span 2;
}

.field-shell label,
.file-card label,
.agreement-box label {
  display: block;
  margin-bottom: 8px;
  color: var(--stonegate-chocolate);
  font-weight: 700;
}

.field-shell input,
.field-shell select,
.file-card input,
.account-opening-card .form-control,
.account-opening-card .form-select {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--stonegate-border);
  border-radius: 6px;
  background: #fffaf2;
  color: var(--stonegate-chocolate);
}

.account-opening-card select.form-select,
.account-opening-card .nice-select.form-select,
.account-opening-card .nice-select {
  height: 56px;
  min-height: 56px;
  padding-top: 0;
  padding-bottom: 0;
  line-height: 54px;
}

.account-opening-card select.form-select {
  padding-left: 14px;
  padding-right: 42px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-opening-card .nice-select {
  display: block;
  padding-left: 14px;
  padding-right: 52px;
}

.account-opening-card .nice-select::before {
  right: 22px;
}

.account-opening-card .nice-select .current {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 54px;
}

.account-opening-card .nice-select .list {
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--stonegate-gold) rgba(184, 155, 94, 0.14);
  scrollbar-width: thin;
}

.account-opening-card .nice-select .list::-webkit-scrollbar {
  width: 8px;
}

.account-opening-card .nice-select .list::-webkit-scrollbar-track {
  background: rgba(184, 155, 94, 0.14);
  border-radius: 999px;
}

.account-opening-card .nice-select .list::-webkit-scrollbar-thumb {
  background: var(--stonegate-gold);
  border: 2px solid var(--stonegate-paper);
  border-radius: 999px;
}

.account-opening-card .nice-select .list::-webkit-scrollbar-thumb:hover {
  background: var(--stonegate-wine);
}

.account-opening-card .nice-select .option {
  min-height: 40px;
  line-height: 40px;
}

.country-select-wrap {
  position: relative;
}

.account-opening-card .niceCountryInputSelector {
  position: relative;
  width: 100%;
}

.account-opening-card .niceCountryInputMenu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: 0 18px 0 14px;
  border: 1px solid var(--stonegate-border);
  border-radius: 6px;
  background: #fffaf2 !important;
  color: var(--stonegate-chocolate) !important;
}

.account-opening-card .niceCountryInputMenu a,
.account-opening-card .niceCountryInputMenuDefaultText,
.account-opening-card .niceCountryInputMenuDefaultText span {
  color: var(--stonegate-chocolate) !important;
  font-size: 16px;
  line-height: 54px;
}

.account-opening-card .niceCountryInputMenuDefaultText {
  display: block;
  flex: 1 1 auto;
  width: auto;
}

.account-opening-card .niceCountryInputMenuDefaultText a {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}

.account-opening-card .niceCountryInputMenuDefaultText span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-opening-card .niceCountryInputMenuDropdown {
  position: static;
  float: none;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-left: 12px;
  color: var(--stonegate-gold);
  line-height: 1;
}

.account-opening-card .niceCountryInputMenuDropdown .iconify {
  display: none;
}

.account-opening-card .niceCountryInputMenuDropdown::before {
  display: block;
  width: 0;
  height: 0;
  margin-top: 6px;
  border-top: 7px solid var(--stonegate-gold);
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  content: "";
}

.account-opening-card .niceCountryInputMenuFilter,
.account-opening-card .niceCountryInputMenuDropdownContent {
  position: absolute;
  left: 0;
  z-index: 30;
  width: 100%;
  border: 1px solid var(--stonegate-border);
  background: var(--stonegate-paper);
}

.account-opening-card .niceCountryInputMenuFilter {
  top: 56px;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}

.account-opening-card .niceCountryInputMenuFilter input {
  width: calc(100% - 12px);
  min-height: 40px;
  margin: 6px;
  padding: 0 10px;
  border: 1px solid var(--stonegate-border);
  border-radius: 6px;
  background: #fffaf2;
  color: var(--stonegate-chocolate);
}

.account-opening-card .niceCountryInputMenuDropdownContent {
  top: 110px;
  max-height: 250px;
  overflow-x: hidden;
  overflow-y: auto;
  border-top: 0;
  border-radius: 0 0 6px 6px;
  scrollbar-color: var(--stonegate-gold) rgba(184, 155, 94, 0.14);
  scrollbar-width: thin;
}

.account-opening-card .niceCountryInputMenuDropdownContent::-webkit-scrollbar {
  width: 8px;
}

.account-opening-card .niceCountryInputMenuDropdownContent::-webkit-scrollbar-track {
  background: rgba(184, 155, 94, 0.14);
  border-radius: 999px;
}

.account-opening-card .niceCountryInputMenuDropdownContent::-webkit-scrollbar-thumb {
  background: var(--stonegate-gold);
  border: 2px solid var(--stonegate-paper);
  border-radius: 999px;
}

.account-opening-card .niceCountryInputMenuDropdownContent a {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  color: var(--stonegate-chocolate) !important;
  line-height: 40px;
}

.account-opening-card .niceCountryInputMenuDropdownContent a:hover {
  background-color: rgba(184, 155, 94, 0.14) !important;
  color: var(--stonegate-chocolate) !important;
}

.account-opening-card .niceCountryInputMenuCountryFlag {
  flex: 0 0 auto;
  width: 20px;
  height: 15px;
  margin-left: 0;
  margin-right: 10px;
  border: 0;
  border-radius: 2px;
}

.account-opening-card .form-control:focus,
.account-opening-card .form-select:focus,
.account-opening-card .niceCountryInputMenu:focus {
  border-color: var(--stonegate-gold);
  box-shadow: 0 0 0 3px rgba(184, 155, 94, 0.18);
}

.birth-date {
  display: grid;
  grid-template-columns: 0.7fr 1fr 0.8fr;
  gap: 12px;
}

.file-card,
.agreement-box,
.signature-pad-shell {
  padding: 22px;
  border: 1px solid var(--stonegate-border);
  border-radius: 8px;
  background: rgba(255, 248, 237, 0.86);
}

.beneficiary-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.beneficiary-choice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 18px;
  border: 1px solid var(--stonegate-border);
  border-radius: 6px;
  background: #fffaf2;
  cursor: pointer;
}

.beneficiary-choice input {
  width: auto;
  min-height: auto;
}

.beneficiary-fields.is-hidden,
.conditional-field.is-hidden {
  display: none;
}

.agreement-box .form-check {
  display: flex;
  gap: 12px;
  padding: 0;
}

.agreement-box .form-check-input {
  flex: 0 0 auto;
  margin: 5px 0 0;
}

.signature-panel {
  margin-top: 22px;
}

.signature-pad-canvas-wrap {
  position: relative;
  width: 100%;
  height: 230px;
  overflow: hidden;
  border: 1px dashed var(--stonegate-border);
  border-radius: 8px;
  background: #fffdf8;
}

.signature-pad-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.signature-pad-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(43, 30, 23, 0.46);
  pointer-events: none;
}

.signature-panel.has-signature .signature-pad-placeholder {
  opacity: 0;
}

.signature-pad-actions {
  margin-top: 16px;
}

.signature-feedback {
  display: none;
  margin-top: 10px;
  color: #b42318;
  font-weight: 700;
}

.signature-feedback.is-visible {
  display: block;
}

.wizard-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 28px;
}

.wizard-actions.is-end {
  justify-content: flex-end;
}

.field-invalid input,
.field-invalid select,
.field-invalid textarea,
.field-invalid .niceCountryInputMenu,
.field-invalid .signature-pad-canvas-wrap,
.field-invalid.file-card,
.field-invalid.agreement-box {
  border-color: #b42318 !important;
}

.error-copy {
  display: block;
  margin-top: 8px;
  color: #b42318;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 991px) {
  .account-opening-hero {
    padding: 150px 0 82px;
  }

  .account-opening-hero h1 {
    font-size: 46px;
  }

  .wizard-steps,
  .application-grid {
    grid-template-columns: 1fr;
  }

  .wizard-step-tab {
    border-right: 0;
    border-bottom: 1px solid var(--stonegate-border);
  }

  .wizard-step-tab:last-child {
    border-bottom: 0;
  }

  .field-span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 575px) {
  .account-opening-section {
    padding: 72px 0;
  }

  .account-opening-card {
    padding: 24px 18px;
  }

  .birth-date {
    grid-template-columns: 1fr;
  }

  .wizard-actions {
    flex-direction: column;
  }

  .wizard-actions .theme-btn {
    width: 100%;
    justify-content: center;
  }
}
