﻿@import url("https://fonts.googleapis.com/css?family=Inter:300,400,500,700,900&display=swap");
:root {
  /* ---------- Structural palette ---------- */
  --ml-teal-900: #0b3b41;
  --ml-teal-700: #14555e;
  --ml-teal-050: #e7f1f0;
  --ml-ink: #12292c;
  --ml-ink-muted: #6b8288;
  --ml-line: #dbe4e4;
  --ml-line-strong: #c6d4d4;
  --ml-surface: #ffffff;
  --ml-surface-sunken: #f4f7f7;
  --ml-danger: #d64545;
  --ml-danger-bg: #fdecec;
  --ml-danger-line: #f6cfcf;
  /* ---------- Shape, depth, type ---------- */
  --ml-radius-card: 16px;
  --ml-radius-field: 12px;
  --ml-radius-tile: 10px;
  --ml-radius-pill: 999px;
  --ml-gap: 16px;
  --ml-pad-card: 20px;
  --ml-card-w: 420px;
  --ml-shadow-card: 0 1px 2px rgba(16, 40, 44, .05), 0 8px 24px rgba(16, 40, 44, .07);
  --ml-font: "Inter", Helvetica, Arial, "Lucida Grande", sans-serif;
  /* ---------- Semantic, tenant-driven ----------
     Both the hero band and the primary action read --highlight, so existing tenant branding
     carries over unchanged. In practice the fallback rarely applies: ControllerHelperService
     always supplies a colour (#065980 when BYOD is off), so it only covers a missing or
     malformed value. Coral stays a fixed accent used for small decorative details. */
  --ml-hero-bg: var(--highlight, #0b3b41);
  --ml-hero-ink: #ffffff;
  --ml-action: var(--highlight, #0b3b41);
  --ml-action-ink: #ffffff;
  --ml-spark: var(--accent, #a2a2a2);
  --ml-spark-50: color-mix(in srgb, var(--ml-spark), white 20%);
  --ml-focus: var(--ml-action);
  /* Arrow used as a mask so it inherits the button's text colour and works on both the filled
     and outline variants without a second asset. */
  --ml-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8h11M9 4l4 4-4 4' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ml-font);
  color: var(--ml-ink);
  background-color: var(--ml-surface-sunken);
  -webkit-font-smoothing: antialiased;
}

.background-image {
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  background-attachment: fixed;
}

.container,
.page-shell {
  position: static;
  top: auto;
  left: auto;
  transform: none;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.full-height {
  display: flex;
  width: 100%;
  min-height: 100vh;
  height: auto;
  overflow: visible;
  padding: 24px 16px;
}

a {
  color: var(--ml-action);
  text-decoration: none;
}
a:hover, a:focus-visible {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--ml-focus);
  outline-offset: 2px;
}

html[lang^=zh] .field-label,
html[lang^=zh] .hero-club-name,
html[lang^=zh] .hero-eyebrow,
html[lang^=zh] .section-badge {
  letter-spacing: normal;
}

@media (prefers-reduced-motion: reduce) {
  .marquee-content {
    animation: none;
  }
  .card-accordion-chevron,
  .submit-button,
  .material-input.input {
    transition: none;
  }
}
/* ============================================================ Hero band */
.hero-band {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px var(--ml-pad-card);
  color: var(--ml-hero-ink);
  background-color: var(--ml-hero-bg);
  background-image: linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.28));
}
.hero-band.hero-band--logo {
  gap: 0;
  padding: 0;
  text-align: center;
  color: var(--ml-ink);
  background-color: #fff;
  background-image: none;
}
.hero-band.hero-band--logo .hero-eyebrow,
.hero-band.hero-band--logo .hero-subtitle {
  padding-left: var(--ml-pad-card);
  padding-right: var(--ml-pad-card);
}
.hero-band.hero-band--logo .hero-eyebrow {
  justify-content: center;
  margin-top: 14px;
}
.hero-band.hero-band--logo .hero-subtitle {
  margin-top: 6px;
  color: var(--ml-ink-muted);
}
.hero-band.hero-band--logo > :last-child:not(.hero-logo-tile) {
  margin-bottom: 18px;
}

/* ---- Compact header: small rounded logo chip beside the club name (the mockup treatment) ---- */
.hero-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-logo-chip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  overflow: hidden;
  background: #fff;
  border-radius: 12px;
}
.hero-logo-chip img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ---- Entry-screen header: the logo alone, full width ---- */
.hero-logo-tile {
  display: block;
  width: 100%;
  padding: var(--ml-pad-card);
}
.hero-logo-tile img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.hero-club-name {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: inherit;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 3px 0 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ml-spark);
}
.hero-eyebrow svg {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.hero-subtitle {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

/* ============================================================ Auth card */
.auth-card {
  width: 100%;
  max-width: var(--ml-card-w);
  margin: auto;
  padding-bottom: 0;
  overflow: hidden;
  background-color: var(--ml-surface);
  border-radius: var(--ml-radius-card);
  box-shadow: var(--ml-shadow-card);
}

.auth-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--ml-gap);
  padding: var(--ml-pad-card);
  background: var(--ml-surface-sunken);
}

.auth-card-body > form {
  display: flex;
  flex-direction: column;
  gap: var(--ml-gap);
}

/* ============================================================ Section card */
.section-card {
  padding: var(--ml-pad-card);
  background: var(--ml-surface);
  border: 1px solid var(--ml-line);
  border-radius: var(--ml-radius-card);
}

.section-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.section-icon-tile {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--ml-radius-tile);
  background: var(--ml-teal-050);
  color: var(--ml-teal-900);
}
.section-icon-tile svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.section-icon-tile.tile-accent {
  background: var(--ml-spark-050);
  color: var(--ml-spark);
}

.section-card-heading {
  flex: 1 1 auto;
  min-width: 0;
}

.section-card-title {
  display: block;
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ml-ink);
}

.section-card-subtitle {
  display: block;
  margin: 2px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ml-ink-muted);
}

.section-badge {
  flex: 0 0 auto;
  align-self: center;
  padding: 4px 10px;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ml-teal-900);
  background: var(--ml-teal-050);
  border-radius: var(--ml-radius-pill);
}

.section-card-body {
  margin-top: 16px;
}

/* ============================================================ Fields */
.field {
  display: block;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ml-ink-muted);
}

.field-required {
  margin-left: 2px;
  color: var(--ml-spark);
}

.material-input.input {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0 0 14px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.25;
  text-align: left;
  color: var(--ml-ink);
  background: var(--ml-surface);
  border: 1px solid var(--ml-line);
  border-radius: var(--ml-radius-field);
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.material-input.input::placeholder {
  color: var(--ml-ink-muted);
  opacity: 1;
}
.material-input.input:hover {
  border-color: var(--ml-line-strong);
}
.material-input.input:focus {
  border-color: var(--ml-action);
  outline: 2px solid var(--ml-focus);
  outline-offset: 0;
}
.material-input.input.input-validation-error, .material-input.input[aria-invalid=true] {
  border-color: var(--ml-danger);
}
.material-input.input[disabled], .material-input.input[readonly] {
  color: var(--ml-ink-muted);
  background: var(--ml-surface-sunken);
}

input[type=date].material-input.input {
  min-height: 51px;
}
input[type=date].material-input.input::-webkit-date-and-time-value {
  text-align: left;
}

select.material-input.input {
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%236b8288' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}
select.material-input.input::-ms-expand {
  display: none;
}

.field-hint {
  display: block;
  margin: -8px 0 14px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ml-ink-muted);
}

.field-error {
  display: block;
  margin: -8px 0 14px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ml-danger);
}
.field-error:empty {
  display: none;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 12px;
}

@media (min-width: 400px) {
  .field-row {
    grid-template-columns: 1fr 1fr;
  }
}
/* ============================================================ Password reveal */
.password-display-box {
  position: relative;
  margin-bottom: 14px;
}
.password-display-box .material-input.input {
  margin-bottom: 0;
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  padding: 0;
  background: transparent;
  border: 0;
  color: var(--ml-ink-muted);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.password-toggle .icon-eye-off {
  display: none;
}
.password-toggle:hover {
  color: var(--ml-ink);
}
.password-toggle.is-revealed {
  color: var(--ml-action);
}
.password-toggle.is-revealed .icon-eye {
  display: none;
}
.password-toggle.is-revealed .icon-eye-off {
  display: block;
}

/* ============================================================ Collapsible card */
.card-accordion {
  padding: 0;
}
.card-accordion > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--ml-pad-card);
  cursor: pointer;
  list-style: none;
}
.card-accordion > summary::-webkit-details-marker {
  display: none;
}
.card-accordion .card-accordion-subtitle-open {
  display: none;
}
.card-accordion[open] .card-accordion-subtitle-closed {
  display: none;
}
.card-accordion[open] .card-accordion-subtitle-open {
  display: block;
}

.card-accordion-chevron {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-left: auto;
  background-color: var(--ml-ink-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E") center/18px 18px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E") center/18px 18px no-repeat;
  transition: transform 0.18s ease;
}

.card-accordion[open] .card-accordion-chevron {
  transform: rotate(180deg);
}

.card-accordion-panel {
  padding: var(--ml-pad-card);
  padding-top: var(--ml-pad-card);
  border-top: 1px solid var(--ml-line);
}

/* ============================================================ Checkbox block */
.check-block {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--ml-teal-050);
  border-radius: var(--ml-radius-field);
}
.check-block input[type=checkbox] {
  flex: 0 0 auto;
  display: grid;
  place-content: center;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  background: #fff;
  border: 1px solid #b9cdcd;
  border-radius: 6px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.check-block input[type=checkbox]::before {
  content: "";
  width: 11px;
  height: 11px;
  background: #fff;
  transform: scale(0);
  transition: transform 0.1s ease-in-out;
  clip-path: polygon(14% 45%, 0 60%, 40% 100%, 100% 22%, 85% 8%, 38% 71%);
}
.check-block input[type=checkbox]:checked {
  background: var(--ml-action);
  border-color: var(--ml-action);
}
.check-block input[type=checkbox]:checked::before {
  transform: scale(1);
}
.check-block label {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ml-ink);
  cursor: pointer;
}
.check-block strong {
  font-weight: 700;
}

/* ============================================================ Buttons */
.button-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 16px 20px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  color: var(--ml-action-ink);
  background: var(--ml-action);
  border: 1px solid var(--ml-action);
  border-radius: var(--ml-radius-field);
  box-shadow: none;
  cursor: pointer;
  transition: filter 0.12s ease, transform 0.06s ease;
}
.submit-button::after {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--ml-arrow) center/16px 16px no-repeat;
  mask: var(--ml-arrow) center/16px 16px no-repeat;
}
.submit-button:hover, .submit-button:focus {
  color: var(--ml-action-ink);
  filter: brightness(1.08);
  text-decoration: none;
}
.submit-button:active {
  transform: translateY(1px);
}
.submit-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.submit-button.no-arrow::after {
  content: none;
}

.guest-button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 15px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: var(--ml-action);
  background: transparent;
  border: 1px solid var(--ml-line);
  border-radius: var(--ml-radius-field);
  box-shadow: none;
}
.guest-button:hover, .guest-button:focus {
  color: var(--ml-action);
  background: var(--ml-surface-sunken);
  text-decoration: none;
}

/* ============================================================ Notices */
.validation-summary-errors {
  margin: 0;
  padding: 12px 14px;
  color: var(--ml-danger);
  background: var(--ml-danger-bg);
  border: 1px solid var(--ml-danger-line);
  border-radius: var(--ml-radius-field);
}
.validation-summary-errors ul.info-message {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}
.validation-summary-errors ul.info-message li {
  list-style: disc;
  list-style-position: outside;
}

.validation-summary-valid {
  display: none;
}

.info-message.info {
  margin: 0;
  padding: 12px 14px;
  list-style: none;
  color: var(--ml-teal-900);
  background: var(--ml-teal-050);
  border: 1px solid #cfe3e3;
  border-radius: var(--ml-radius-field);
}
.info-message.info li {
  list-style: none;
}

.footer-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  color: var(--ml-ink-muted);
}
.footer-note svg {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.login-form {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-top: 0;
}

.login-message {
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  color: var(--ml-ink-muted);
}

.submit-button-wrapper,
.guest-button-wrapper {
  max-width: none;
  margin: 0;
}

.reset-password {
  margin-top: 14px;
  margin-bottom: 0;
  line-height: 1.3;
}
.reset-password a {
  display: block;
  font-size: 13px;
  text-align: center;
}

.register-member {
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
}
.register-member a {
  text-align: center;
}

.register-form > .col {
  margin-bottom: 0;
}

.register-form-captcha {
  margin-bottom: 0;
}
.register-form-captcha .g-recaptcha {
  width: fit-content;
  margin: 0 auto;
}

.txt-c {
  text-align: center;
}

.info-message {
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}

.link-disabled {
  opacity: 0.5;
  color: var(--ml-ink-muted);
  pointer-events: none;
}

.resend-code {
  font-size: 13px;
}
.resend-code span {
  display: block;
  margin-bottom: 2px;
  text-align: center;
}

/* ---------- Language selector ---------- */
.language-selector-wrapper {
  --ml-marquee-item: 22px;
  --ml-marquee-pad: 13px;
  position: relative;
  height: calc(var(--ml-marquee-item) + var(--ml-marquee-pad) * 2 + 2px);
  margin-top: 0;
  overflow: hidden;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%236b8288' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
  border: 1px solid var(--ml-line);
  border-radius: var(--ml-radius-field);
}
.language-selector-wrapper:hover .marquee-content {
  animation-play-state: paused;
}

.language-marquee {
  position: relative;
  height: 100%;
  padding: var(--ml-marquee-pad) 40px var(--ml-marquee-pad) 16px;
  overflow: hidden;
}

.marquee-content {
  display: flex;
  flex-direction: column;
  animation: marquee-scroll-vertical 12s linear infinite;
}

.marquee-item {
  height: var(--ml-marquee-item);
  line-height: var(--ml-marquee-item);
  padding: 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ml-ink);
}

@keyframes marquee-scroll-vertical {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-50%);
  }
}
.language-dropdown {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* ---------- Member card / wallet ---------- */
.barcode-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  margin-bottom: 7px;
}

.barcode-text {
  font-size: 14px;
  letter-spacing: 0.12em;
  text-align: center;
  color: var(--ml-ink-muted);
}

.apple-wallet-container,
.google-wallet-container {
  display: flex;
  justify-content: center;
}

.add-to-apple-wallet-button,
.add-to-google-wallet-button {
  display: inline-block;
  width: 174px;
  height: 48px;
  margin-top: 7px;
  margin-bottom: 7px;
  border: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.add-to-google-wallet-button {
  background-image: url("../images/enAU_add_to_google_wallet_add-wallet-badge.svg");
}

.add-to-apple-wallet-button {
  background-image: url("../images/US-UK_Add_to_Apple_Wallet_RGB_101421.svg");
}
