/* ==========================================================
   Courts Mammouth - customer form (sign-up + Personal information)
   Scoped to :is(#customer-form.cm-customer-form, #cm-login) only.
   !important is used on purpose: theme + custom CSS files are loaded
   after this one and style the same generic classes.
   ========================================================== */

:is(#customer-form.cm-customer-form, #cm-login) {
  --cm-blue: #0068c9;
  --cm-blue-dark: #0057a8;
  --cm-blue-light: #e6f0fb;
  --cm-text: #1d1d1b;
  --cm-label: #222;
  --cm-muted: #8a8f98;
  --cm-border: #e1e4e8;
  --cm-field-bg: #f7f8fa;
  --cm-red: #e30613;
  color: var(--cm-text);
  font-size: 15px;
  padding: 8px 20px 24px;
}

/* ---------- generic layout: label on top, field full width ---------- */
:is(#customer-form.cm-customer-form, #cm-login) .form-group.row {
  display: block !important;
  margin: 0 0 20px !important;
}
:is(#customer-form.cm-customer-form, #cm-login) .form-group.row > .col-md-3,
:is(#customer-form.cm-customer-form, #cm-login) .form-group.row > .col-md-6 {
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
  float: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  text-align: left !important;
}
:is(#customer-form.cm-customer-form, #cm-login) .form-group.row > .form-control-comment {
  display: none !important;
}
:is(#customer-form.cm-customer-form, #cm-login) .form-control-label {
  display: block !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: var(--cm-label) !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  text-align: left !important;
  line-height: 1.3;
}
:is(#customer-form.cm-customer-form, #cm-login) .form-control-label.required::before { content: none !important; }
:is(#customer-form.cm-customer-form, #cm-login) .form-control-label.required::after {
  content: "*";
  color: var(--cm-red);
  margin-left: 2px;
  font-size: 12px;
  vertical-align: top;
}
:is(#customer-form.cm-customer-form, #cm-login) .form-control-label.cm-label-checkbox { display: none !important; }
#customer-form .cm-optional { display: none; }
:is(#customer-form.cm-customer-form, #cm-login) .cm-optional {
  display: inline;
  font-weight: 400;
  font-style: italic;
  color: var(--cm-label);
  margin-left: 2px;
}

/* ---------- inputs ---------- */
:is(#customer-form.cm-customer-form, #cm-login) input.form-control,
:is(#customer-form.cm-customer-form, #cm-login) select.form-control {
  width: 100% !important;
  height: 46px !important;
  background: var(--cm-field-bg) !important;
  border: 1px solid var(--cm-border) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  padding: 0 14px;
  font-size: 15px !important;
  color: var(--cm-text) !important;
}
:is(#customer-form.cm-customer-form, #cm-login) input.form-control::placeholder { color: #a3a8b0 !important; }
:is(#customer-form.cm-customer-form, #cm-login) input.form-control:focus {
  border-color: var(--cm-blue) !important;
  background: #fff !important;
  outline: none !important;
}
:is(#customer-form.cm-customer-form, #cm-login) input.form-control[readonly] {
  background: #eceef1 !important;
  color: #555 !important;
  cursor: not-allowed;
}
:is(#customer-form.cm-customer-form, #cm-login) .cm-locked-note {
  display: block;
  font-size: 12px;
  font-style: italic;
  color: var(--cm-muted);
  margin-top: 5px;
}
:is(#customer-form.cm-customer-form, #cm-login) .has-error input.form-control { border-color: var(--cm-red) !important; }
:is(#customer-form.cm-customer-form, #cm-login) .help-block,
:is(#customer-form.cm-customer-form, #cm-login) .help-block ul { margin: 6px 0 0 !important; padding: 0 !important; list-style: none !important; }
:is(#customer-form.cm-customer-form, #cm-login) .help-block .alert {
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  color: var(--cm-red) !important;
  font-size: 13px !important;
}

/* ---------- section titles + separators ---------- */
:is(#customer-form.cm-customer-form, #cm-login) h3.cm-section-title {
  color: var(--cm-blue) !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  border: 0 !important;
}
:is(#customer-form.cm-customer-form, #cm-login) hr.cm-sep {
  border: 0 !important;
  border-top: 1px solid var(--cm-border) !important;
  margin: 26px 0 !important;
}

/* ---------- Citizen / Non-citizen pills ---------- */
:is(#customer-form.cm-customer-form, #cm-login) .cm-customer-type { margin: 0 !important; }
:is(#customer-form.cm-customer-form, #cm-login) .cm-type-toggle {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
:is(#customer-form.cm-customer-form, #cm-login) .cm-type-option {
  flex: 0 1 220px;
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 42px;
  padding: 0 18px !important;
  margin: 0 !important;
  border: 1px solid #c6ccd4;
  border-radius: 21px;
  background: #fff;
  color: var(--cm-text);
  font-size: 16px !important;
  font-weight: 400 !important;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
:is(#customer-form.cm-customer-form, #cm-login) .cm-type-option input {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  pointer-events: none;
}
:is(#customer-form.cm-customer-form, #cm-login) .cm-type-option.active {
  background: var(--cm-blue-light);
  border-color: var(--cm-blue);
}
:is(#customer-form.cm-customer-form, #cm-login) .cm-type-option.disabled { cursor: not-allowed; opacity: .55; }
:is(#customer-form.cm-customer-form, #cm-login) .cm-type-option.disabled.active { opacity: 1; }
:is(#customer-form.cm-customer-form, #cm-login) .cm-type-option:focus-within {
  outline: 2px solid var(--cm-blue);
  outline-offset: 2px;
}
:is(#customer-form.cm-customer-form, #cm-login) .cm-type-icon {
  display: inline-block;
  flex: none;
  background: center / contain no-repeat;
}
:is(#customer-form.cm-customer-form, #cm-login) .cm-type-icon-citizen {
  width: 21px; height: 16px;
  background-image: url("../img/cm-customer-form/citizen.svg");
}
:is(#customer-form.cm-customer-form, #cm-login) .cm-type-icon-noncitizen {
  width: 15px; height: 20px;
  background-image: url("../img/cm-customer-form/noncitizen.svg");
}
:is(#customer-form.cm-customer-form, #cm-login) .cm-help {
  font-size: 13px;
  font-style: italic;
  color: var(--cm-muted);
  margin: 14px 0 0 !important;
}

/* ---------- Radios (Title, Membership) ---------- */
:is(#customer-form.cm-customer-form, #cm-login) .form-control-valign {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 34px;
  padding-top: 0 !important;
}
:is(#customer-form.cm-customer-form, #cm-login) label.radio-inline {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  color: var(--cm-text) !important;
  cursor: pointer;
}
:is(#customer-form.cm-customer-form, #cm-login) .custom-radio {
  position: relative !important;
  display: inline-block !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  margin: 0 !important;
  border: 1.5px solid #9aa1ab !important;
  border-radius: 50% !important;
  background: #fff !important;
  vertical-align: middle;
}
:is(#customer-form.cm-customer-form, #cm-login) .custom-radio input[type="radio"] {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  opacity: 0 !important;
  cursor: pointer;
  z-index: 1;
}
:is(#customer-form.cm-customer-form, #cm-login) .custom-radio input[type="radio"] + span {
  display: none !important;
}
:is(#customer-form.cm-customer-form, #cm-login) .custom-radio input[type="radio"]:checked + span {
  display: block !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  width: 8px !important;
  height: 8px !important;
  margin: -4px 0 0 -4px !important;
  border-radius: 50% !important;
  background: var(--cm-blue) !important;
}
:is(#customer-form.cm-customer-form, #cm-login) .custom-radio.is-checked,
:is(#customer-form.cm-customer-form, #cm-login) .custom-radio:has(input:checked) {
  border-color: var(--cm-blue) !important;
}

/* Membership: one option per line, field label hidden (section title is enough) */
:is(#customer-form.cm-customer-form, #cm-login) [data-field="membership_type"] > .form-control-label { display: none !important; }
:is(#customer-form.cm-customer-form, #cm-login) [data-field="membership_type"] .form-control-valign {
  flex-direction: column;
  gap: 14px;
}

/* ---------- Checkboxes (newsletter, terms) ---------- */
:is(#customer-form.cm-customer-form, #cm-login) .custom-checkbox {
  position: relative;
  display: block;
}
:is(#customer-form.cm-customer-form, #cm-login) .custom-checkbox > label {
  display: block !important;
  position: relative;
  margin: 0 !important;
  padding: 0 0 0 32px !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  color: var(--cm-text) !important;
  line-height: 1.45;
  cursor: pointer;
  text-align: left !important;
}
:is(#customer-form.cm-customer-form, #cm-login) .custom-checkbox input[type="checkbox"] {
  position: absolute !important;
  left: 0;
  top: 1px;
  opacity: 0 !important;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  z-index: 1;
  cursor: pointer;
}
:is(#customer-form.cm-customer-form, #cm-login) [data-field]:not([data-field="pref"]) .custom-checkbox input[type="checkbox"] + span {
  position: absolute !important;
  left: 0;
  top: 1px;
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  border: 1.5px solid #b5bbc3 !important;
  border-radius: 3px !important;
  background: #fff !important;
}
:is(#customer-form.cm-customer-form, #cm-login) [data-field]:not([data-field="pref"]) .custom-checkbox input[type="checkbox"] + span .checkbox-checked {
  display: none !important;
}
:is(#customer-form.cm-customer-form, #cm-login) [data-field]:not([data-field="pref"]) .custom-checkbox input[type="checkbox"]:checked + span {
  background: var(--cm-blue) !important;
  border-color: var(--cm-blue) !important;
}
/* tick drawn in CSS (no icon font needed) */
:is(#customer-form.cm-customer-form, #cm-login) [data-field]:not([data-field="pref"]) .custom-checkbox input[type="checkbox"]:checked + span::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
:is(#customer-form.cm-customer-form, #cm-login) .custom-checkbox input[type="checkbox"]:focus-visible + span {
  outline: 2px solid var(--cm-blue);
  outline-offset: 2px;
}
:is(#customer-form.cm-customer-form, #cm-login) .custom-checkbox a { color: var(--cm-blue) !important; text-decoration: underline !important; }
:is(#customer-form.cm-customer-form, #cm-login) .custom-checkbox label em {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: #555;
}

/* ---------- Marketing preferences pills (All / Email / SMS / Call) ---------- */
:is(#customer-form.cm-customer-form, #cm-login) [data-field="pref"] { margin-top: 6px !important; }
:is(#customer-form.cm-customer-form, #cm-login) .commLegend {
  border: 0 !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  width: auto !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  color: var(--cm-text) !important;
  font-weight: 400 !important;
}
:is(#customer-form.cm-customer-form, #cm-login) .commLegend .font-weight-bold {
  display: inline-block;
  font-size: 15px;
  font-weight: 600 !important;
  margin-bottom: 4px;
}
:is(#customer-form.cm-customer-form, #cm-login) #preferred-contact { margin: 0 !important; padding: 0 !important; }
:is(#customer-form.cm-customer-form, #cm-login) #pref-flex-container {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin: 0 !important;
  padding: 0 !important;
}
:is(#customer-form.cm-customer-form, #cm-login) #pref-flex-container .custom-checkbox {
  flex: 0 1 112px;
  margin: 0 !important;
  padding: 0 !important;
}
:is(#customer-form.cm-customer-form, #cm-login) #pref-flex-container .form-check-label {
  display: block !important;
  position: relative;
  padding: 0 !important;
  margin: 0 !important;
}
:is(#customer-form.cm-customer-form, #cm-login) #pref-flex-container input[type="checkbox"] {
  width: 100% !important;
  height: 100% !important;
  inset: 0;
}
:is(#customer-form.cm-customer-form, #cm-login) #pref-flex-container input[type="checkbox"] + span {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  height: 38px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border: 1px solid #c6ccd4 !important;
  border-radius: 4px !important;
  background: #fff !important;
  box-shadow: none !important;
  transition: background .15s, border-color .15s;
}
:is(#customer-form.cm-customer-form, #cm-login) #pref-flex-container input[type="checkbox"]:checked + span,
:is(#customer-form.cm-customer-form, #cm-login) #pref-flex-container .custom-checkbox.is-checked input[type="checkbox"] + span {
  background: var(--cm-blue-light) !important;
  border-color: var(--cm-blue) !important;
}
:is(#customer-form.cm-customer-form, #cm-login) #pref-flex-container .pcontent {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  font-size: 15px !important;
  color: var(--cm-text) !important;
  background: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  width: auto !important;
  height: auto !important;
}
:is(#customer-form.cm-customer-form, #cm-login) #pref-flex-container .pcontent::before {
  content: "";
  display: inline-block;
  flex: none;
  width: 26px;
  height: 26px;
  background: center / contain no-repeat;
}
:is(#customer-form.cm-customer-form, #cm-login) #pref-flex-container .pcontent.email::before { background-image: url("../img/cm-customer-form/email.svg"); }
:is(#customer-form.cm-customer-form, #cm-login) #pref-flex-container .pcontent.sms::before { background-image: url("../img/cm-customer-form/sms.svg"); }
:is(#customer-form.cm-customer-form, #cm-login) #pref-flex-container .pcontent.call::before { background-image: url("../img/cm-customer-form/call.svg"); }
/* "All": empty circle, blue check icon when selected */
:is(#customer-form.cm-customer-form, #cm-login) #pref-flex-container .pcontent.all::before {
  width: 18px;
  height: 18px;
  border: 1.5px solid #b5bbc3;
  border-radius: 50%;
  background-color: #fff;
}
:is(#customer-form.cm-customer-form, #cm-login) #pref-flex-container input:checked + span .pcontent.all::before,
:is(#customer-form.cm-customer-form, #cm-login) #pref-flex-container .is-checked .pcontent.all::before {
  border: 0;
  background-color: transparent;
  background-image: url("../img/cm-customer-form/all.svg");
}

/* ---------- Password + show button ---------- */
:is(#customer-form.cm-customer-form, #cm-login) .input-group { display: flex !important; width: 100%; }
:is(#customer-form.cm-customer-form, #cm-login) .input-group .form-control {
  border-right: 0 !important;
  flex: 1 1 auto !important;
  width: 1% !important;
  min-width: 0;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}
:is(#customer-form.cm-customer-form, #cm-login) .input-group-btn { display: flex !important; flex: 0 0 auto !important; width: auto !important; }
:is(#customer-form.cm-customer-form, #cm-login) .input-group-btn .btn {
  height: 46px !important;
  width: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--cm-border) !important;
  border-left: 0 !important;
  border-radius: 0 4px 4px 0 !important;
  background: var(--cm-field-bg) center / 16px auto no-repeat url("../img/cm-customer-form/eye-closed.svg") !important;
  color: transparent !important;
  font-size: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
}
/* password visible -> open eye */
:is(#customer-form.cm-customer-form, #cm-login) .input-group-btn .btn.cm-pw-shown {
  background-image: url("../img/cm-customer-form/eye-open.svg") !important;
  background-size: 16px auto !important;
}
:is(#customer-form.cm-customer-form, #cm-login) .input-group:focus-within .form-control,
:is(#customer-form.cm-customer-form, #cm-login) .input-group:focus-within .btn { background-color: #fff !important; }

/* ---------- Mobile with country picker (intl-tel-input v23) ---------- */
:is(#customer-form.cm-customer-form, #cm-login) .iti { width: 100%; display: block; }
:is(#customer-form.cm-customer-form, #cm-login) .iti__selected-country {
  background: #fff !important;
  border-right: 1px solid var(--cm-border) !important;
  border-radius: 4px 0 0 4px;
  padding: 0 10px 0 12px !important;
  margin: 0 !important;
  height: 100%;
  box-shadow: none !important;
}
:is(#customer-form.cm-customer-form, #cm-login) .iti__selected-dial-code { font-size: 15px; color: var(--cm-text); }
:is(#customer-form.cm-customer-form, #cm-login) .iti__dropdown-content {
  z-index: 60;
  border: 1px solid var(--cm-border);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  overflow: hidden;
}
:is(#customer-form.cm-customer-form, #cm-login) .iti__search-input {
  height: 40px !important;
  width: 100% !important;
  padding: 0 12px 0 34px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--cm-border) !important;
  border-radius: 0 !important;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8f98' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 10px center / 16px no-repeat !important;
  font-size: 14px !important;
  outline: none !important;
  box-shadow: none !important;
}
:is(#customer-form.cm-customer-form, #cm-login) .iti__country-list {
  max-height: 240px;
  font-size: 14px;
  margin: 0 !important;
  padding: 0 !important;
}
:is(#customer-form.cm-customer-form, #cm-login) .iti__country { padding: 8px 12px !important; margin: 0 !important; }
:is(#customer-form.cm-customer-form, #cm-login) .iti__country.iti__highlight { background: var(--cm-blue-light) !important; }
/* fullscreen popup on phones: keep it above the sticky header */
.iti--fullscreen-popup.iti--container { z-index: 100000 !important; }
.iti--fullscreen-popup .iti__search-input { height: 44px; padding: 0 12px; font-size: 16px; }
:is(#customer-form.cm-customer-form, #cm-login) .cm-mobile-error {
  color: var(--cm-red);
  font-size: 13px;
  margin-top: 6px;
}
:is(#customer-form.cm-customer-form, #cm-login) .cm-mobile-hint {
  color: #8a5a00;
  background: #fff7e0;
  border: 1px solid #f3dc9b;
  border-radius: 4px;
  font-size: 13px;
  padding: 6px 10px;
  margin-top: 6px;
}

/* ---------- Footer / Save ---------- */
:is(#customer-form.cm-customer-form, #cm-login) .form-footer { margin-top: 26px !important; padding: 0 !important; }
:is(#customer-form.cm-customer-form, #cm-login) .form-footer .form-control-submit {
  float: none !important;
  display: block !important;
  width: 100% !important;
  height: 48px !important;
  border-radius: 24px !important;
  background: var(--cm-blue) !important;
  border: 0 !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  letter-spacing: .5px;
  text-transform: uppercase !important;
  box-shadow: none !important;
}
:is(#customer-form.cm-customer-form, #cm-login) .form-footer .form-control-submit:hover { background: var(--cm-blue-dark) !important; }

/* ---------- Mobile screens ---------- */
@media (max-width: 575px) {
  :is(#customer-form.cm-customer-form, #cm-login) { padding: 4px 4px 20px; }
  :is(#customer-form.cm-customer-form, #cm-login) .cm-type-toggle { gap: 10px; }
  :is(#customer-form.cm-customer-form, #cm-login) .cm-type-option { flex: 1 1 0; padding: 0 8px !important; font-size: 15px !important; }
  :is(#customer-form.cm-customer-form, #cm-login) .form-control-valign { gap: 10px 22px; }
  :is(#customer-form.cm-customer-form, #cm-login) #pref-flex-container { display: grid !important; grid-template-columns: 1fr 1fr; }
  :is(#customer-form.cm-customer-form, #cm-login) #pref-flex-container .custom-checkbox { flex: none; }
}

/* ==========================================================
   Login page (customer/authentication.tpl)
   ========================================================== */
#cm-login { max-width: 850px; margin: 0 auto; padding: 22px 26px 10px; }
#cm-login h1.cm-login-title {
  padding-bottom: 6px !important;
  font-size: 24px !important;
  font-weight: 600 !important;
  color: var(--cm-text) !important;
  text-transform: none !important;
  margin: 0 0 18px !important;
}
#cm-login .cm-login-intro { font-size: 16px; color: var(--cm-text); margin: 0 0 14px; }
#cm-login .cm-type-option { flex: 0 1 235px; }
#cm-login .login-form { margin: 0 !important; padding: 0 !important; }
#cm-login .form-control-label.required::after { content: none !important; }
#cm-login .forgot-password {
  text-align: right !important;
  margin: -8px 0 0 !important;
  padding: 0 !important;
}
#cm-login .forgot-password a { color: var(--cm-blue) !important; font-size: 16px; }
#cm-login .form-footer { margin-top: 36px !important; padding: 0 !important; text-align: center; }
#cm-login #submit-login {
  float: none !important;
  display: block !important;
  width: 100% !important;
  height: 52px !important;
  border-radius: 26px !important;
  background: var(--cm-blue) !important;
  border: 0 !important;
  color: #fff !important;
  font-size: 17px !important;
  font-weight: 500 !important;
  letter-spacing: .5px;
  text-transform: uppercase !important;
  box-shadow: none !important;
}
#cm-login #submit-login:hover { background: var(--cm-blue-dark) !important; }
#cm-login .cm-otp-login { text-align: center; margin: 26px 0 0; }
#cm-login .cm-otp-login a { color: var(--cm-blue) !important; font-size: 17px; }
#cm-login .no-account {
  text-align: center !important;
  margin: 22px 0 18px !important;
  font-size: 17px;
  color: var(--cm-text);
}
#cm-login .no-account a { color: var(--cm-blue) !important; text-decoration: none; }
#cm-login .no-account a:hover { text-decoration: underline; }
@media (max-width: 575px) {
  #cm-login { padding: 14px 6px 4px; }
  #cm-login h1.cm-login-title {
  padding-bottom: 6px !important; font-size: 20px !important; }
  #cm-login .cm-login-intro { font-size: 15px; }
  #cm-login .cm-type-option { flex: 1 1 0; }
  #cm-login .forgot-password a, #cm-login .no-account { font-size: 15px; }
}
