/* Customer account, authentication and contact pages. Loaded after firend24.css. */
body:is(#authentication, #registration, #password, #my-account, #identity, #address, #addresses, #history, #order-detail,
  #order-follow, #order-slip, #discount, #guest-tracking, #contact, #module-psgdpr-gdpr) {
  --f24-form-gap: 20px;
}

/* Page frame and heading */
#wrapper-page #content-wrapper {
  float: none;
  width: 100%;
  min-width: 0;
  padding: 0 !important;
}
#wrapper-page #main {
  max-width: 100%;
}
#wrapper-page #main > .page-header {
  margin: 8px 0 28px;
  padding: 0;
  border: 0;
  background: none;
}
#wrapper-page #main > .page-header h1 {
  position: relative;
  margin: 0;
  padding-bottom: 16px;
  color: var(--f24-dark);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: none;
  letter-spacing: 0;
}
#wrapper-page #main > .page-header h1::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 3px;
  background: var(--f24-primary);
  content: "";
}
#wrapper-page #main > #content.page-content,
#wrapper-page #main > .page-content.card {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#wrapper-page #main > .page-content h6 {
  margin: 0 0 24px;
  color: var(--f24-text);
  font-size: 16px;
  font-weight: 400;
  text-transform: none;
}
#wrapper-page #main > .page-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--f24-border);
}

/* Forms: stacked label above field, full-width columns */
body:is(#authentication, #registration, #password, #identity, #address, #contact, #module-psgdpr-gdpr)
  :is(.form-group.row, .form-fields .form-group) {
  display: block;
  margin: 0 0 var(--f24-form-gap);
}
body:is(#authentication, #registration, #password, #identity, #address, #contact)
  .form-group.row > :is(.col-md-3, .col-md-6, .col-md-9, .col-md-12, .js-input-column) {
  float: none;
  width: 100%;
  max-width: 100%;
  padding: 0;
}
body:is(#authentication, #registration, #password, #identity, #address, #contact) .form-group.row > .col-md-3.form-control-comment {
  margin-top: 4px;
  color: var(--f24-muted);
  font-size: 14px;
}
body:is(#authentication, #registration, #password, #identity, #address, #contact) .form-control-label {
  display: block;
  margin: 0 0 6px;
  padding: 0;
  color: var(--f24-dark);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
}
body:is(#authentication, #registration, #password, #identity, #address, #contact) .form-control-label.required::after {
  margin-left: 3px;
  color: var(--f24-primary);
  content: "*";
}
body:is(#authentication, #registration, #password, #identity, #address, #contact) :is(.form-control, select.form-control) {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--f24-border);
  border-radius: 2px;
  background-color: var(--f24-white);
  box-shadow: none;
  color: var(--f24-text);
  font-size: 16px;
}
body:is(#authentication, #registration, #password, #identity, #address, #contact) textarea.form-control { min-height: 140px; }
body:is(#authentication, #registration, #password, #identity, #address, #contact) .form-control:focus {
  border-color: var(--f24-dark);
  outline: 0;
  box-shadow: 0 0 0 3px var(--f24-shadow);
}
body:is(#authentication, #registration, #password, #identity, #address, #contact) .form-control-comment {
  display: block;
  margin-top: 4px;
  color: var(--f24-muted);
  font-size: 14px;
}
.form-control-valign, .custom-radio, .custom-checkbox { color: var(--f24-text); }
body .form-group.row:has(.custom-checkbox) > .form-control-label { display: none; }
.custom-checkbox label, .form-group .custom-checkbox, .f24-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  color: var(--f24-text);
  font-size: 14px;
  line-height: 1.5;
}
.custom-checkbox input[type="checkbox"], .f24-consent-label input[type="checkbox"] {
  position: static;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin: 2px 0 0;
  opacity: 1;
  accent-color: var(--f24-primary);
}
.custom-checkbox input[type="checkbox"] + span { display: none; }
.custom-checkbox .material-icons.checkbox-checked { display: none; }
body:is(#registration, #authentication, #identity) .form-group.row:has(.custom-checkbox) > .form-control-label { display: none; }
body:is(#registration, #authentication, #identity) .form-group.row .custom-checkbox,
body:is(#registration, #authentication, #identity) .form-group.row .custom-checkbox label {
  display: block;
}
body:is(#registration, #authentication, #identity) .form-group.row .custom-checkbox label {
  position: relative;
  padding-left: 32px;
}
body:is(#registration, #authentication, #identity) .form-group.row .custom-checkbox input[type="checkbox"] {
  position: absolute;
  top: 2px;
  left: 0;
}
body:is(#registration, #authentication, #identity) .form-group.row .custom-checkbox label:has(input[required])::after {
  margin-left: 3px;
  color: var(--f24-primary);
  content: "*";
}
.f24-consent { margin: 0; }
.f24-consent-label { font-size: 14px; }
.f24-optional, .form-control-comment .optional { color: var(--f24-muted); font-weight: 400; }
.f24-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Password field with show/hide button */
body:is(#authentication, #registration, #identity, #password) .input-group {
  display: flex;
  width: 100%;
}
body:is(#authentication, #registration, #identity, #password) .input-group .form-control { flex: 1 1 auto; min-width: 0; }
body:is(#authentication, #registration, #identity, #password) .input-group-btn { display: flex; width: auto; }
body:is(#authentication, #registration, #identity, #password) .input-group-btn .btn {
  min-width: 96px;
  min-height: 48px;
  margin: 0;
  border: 1px solid var(--f24-border);
  border-left: 0;
  border-radius: 0 2px 2px 0;
  background: var(--f24-bg-soft);
  color: var(--f24-dark);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
}
body:is(#authentication, #registration, #identity, #password) .input-group-btn .btn:hover {
  background: var(--f24-dark);
  color: var(--f24-white);
}
.password-strength-feedback { margin-top: 8px; font-size: 14px; }
.password-strength-feedback .progress { height: 4px; border-radius: 0; background: var(--f24-border); }
.password-requirements p { margin: 2px 0; color: var(--f24-muted); }
.password-requirements .material-icons { font-size: 16px; vertical-align: middle; }

/* Submit buttons */
body:is(#authentication, #registration, #password, #identity, #address, #contact) .form-footer {
  margin: 28px 0 0;
  padding: 0;
  text-align: left;
}
body:is(#authentication, #registration, #password, #identity, #address, #contact) .form-footer .btn,
body:is(#authentication, #registration, #password, #identity, #address, #contact) .form-footer [type="submit"] {
  float: none;
  min-width: 220px;
  min-height: 48px;
  padding: 12px 28px;
  border: 1px solid var(--f24-primary);
  border-radius: 2px;
  background: var(--f24-primary);
  color: var(--f24-white);
  font-size: 16px;
  font-weight: 700;
  text-transform: none;
}
body:is(#authentication, #registration, #password, #identity, #address, #contact) .form-footer [type="submit"]:hover:not(:disabled) {
  border-color: var(--f24-primary-dark);
  background: var(--f24-primary-dark);
}
body:is(#authentication, #registration, #password, #identity, #address, #contact) .form-footer [type="submit"]:disabled {
  border-color: var(--f24-border);
  background: var(--f24-border);
  color: var(--f24-muted);
}

/* Login and registration card */
.f24-auth-card {
  margin: 0 auto 24px;
  padding: 36px 40px 32px;
  border: 1px solid var(--f24-border);
  border-top: 3px solid var(--f24-dark);
  border-radius: 2px;
  background: var(--f24-white);
}
.f24-auth-card--login { max-width: 480px; }
.f24-auth-card--register { max-width: 640px; }
.f24-auth-card .f24-auth-lead { margin: 0 0 24px; color: var(--f24-text); font-size: 16px; line-height: 1.5; }
.f24-auth-card .form-footer .btn, .f24-auth-card .form-footer [type="submit"] { width: 100%; }
.f24-auth-card .forgot-password { margin: -4px 0 0; text-align: left; }
.f24-auth-card .forgot-password a, .f24-auth-card .no-account a { font-weight: 600; }
.f24-auth-card .no-account {
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--f24-border);
  color: var(--f24-text);
  text-align: center;
}
body:is(#authentication, #registration) #wrapper-page #main > .page-header { text-align: center; }
body:is(#authentication, #registration) #wrapper-page #main > .page-header h1::after { left: 50%; transform: translateX(-50%); }
.field-password-policy { margin: 0; }

.f24-auth-card :is(.forgot-password a, .no-account a, .f24-auth-lead a),
.f24-contact-list a { display: inline-block; padding: 10px 0; line-height: 24px; }
.f24-auth-card .no-account a { padding: 10px 4px; }
.f24-contact-list dd a { display: block; padding: 10px 0; }

/* Notifications and errors */
#wrapper-page .alert {
  margin: 0 0 20px;
  padding: 14px 18px;
  border: 1px solid var(--f24-border);
  border-left: 4px solid var(--f24-dark);
  border-radius: 2px;
  background: var(--f24-bg-soft);
  color: var(--f24-text);
  font-size: 15px;
}
#wrapper-page .alert ul { margin: 0; padding-left: 18px; }
#wrapper-page .help-block ul { margin: 0; padding: 0; list-style: none; }
#wrapper-page .alert-danger { border-left-color: var(--f24-primary); color: var(--f24-primary-dark); }
#wrapper-page .alert-success { border-left-color: #2e7d32; }
#wrapper-page .help-block { margin-bottom: 0; }

/* Account dashboard tiles */
.f24-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
}
.f24-tile {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  min-height: 112px;
  padding: 24px;
  border: 1px solid var(--f24-border);
  border-radius: 2px;
  background: var(--f24-white);
  color: var(--f24-dark);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.f24-tile:hover, .f24-tile:focus-visible {
  border-color: var(--f24-primary);
  box-shadow: 0 6px 18px var(--f24-shadow);
  color: var(--f24-dark);
}
.f24-tile .f24-icon { width: 32px; height: 32px; margin-top: 2px; color: var(--f24-primary); }
.f24-tile-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.f24-tile-text strong { font-size: 19px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.f24-tile-text small { color: var(--f24-muted); font-size: 14px; line-height: 1.4; }
.f24-account-logout { display: flex; }
.f24-account-logout .btn { display: inline-flex; align-items: center; gap: 10px; padding: 10px 24px; }
.f24-account-logout .f24-icon { width: 18px; height: 18px; }

/* Back links */
.f24-account-back { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.f24-account-back .account-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--f24-dark);
  font-weight: 600;
  text-decoration: none;
}
.f24-account-back .account-link:hover { color: var(--f24-primary); }
.f24-account-back .f24-icon { width: 18px; height: 18px; }

/* Addresses */
.addresses-footer { margin-top: 24px; }
.addresses-footer a, #addresses .page-footer a.btn { font-weight: 600; }
#address .address-form .form-fields .form-group.row > .col-md-3.form-control-comment:empty { display: none; }
article.address, .address {
  border: 1px solid var(--f24-border);
  border-radius: 2px;
  background: var(--f24-white);
  box-shadow: none;
}
.address .address-body { padding: 20px; }
.address .address-body h4 { margin: 0 0 8px; color: var(--f24-dark); font-size: 18px; font-weight: 700; text-transform: none; }
.address .address-body address { color: var(--f24-text); font-size: 15px; line-height: 1.5; }
.address .address-footer {
  display: flex;
  gap: 20px;
  padding: 12px 20px;
  border-top: 1px solid var(--f24-border);
  background: var(--f24-bg-soft);
}
.address .address-footer a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 600; }
.address .address-footer .material-icons { display: none; }

/* Orders, tables */
.page-content .table, .page-content table {
  width: 100%;
  margin-bottom: 24px;
  border: 1px solid var(--f24-border);
  border-collapse: collapse;
  color: var(--f24-text);
}
.page-content .table thead th, .page-content table thead th {
  padding: 12px 14px;
  border: 0;
  border-bottom: 2px solid var(--f24-dark);
  background: var(--f24-bg-soft);
  color: var(--f24-dark);
  font-size: 14px;
  font-weight: 700;
}
.page-content .table td, .page-content .table tbody th, .page-content table td, .page-content table tbody th {
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--f24-border);
  font-size: 15px;
  vertical-align: middle;
}
.page-content .table-striped tbody tr:nth-of-type(odd) { background: var(--f24-white); }
.page-content .table-striped tbody tr:nth-of-type(even) { background: #fafafa; }
.page-content .label-pill { padding: 4px 10px; border-radius: 2px; font-size: 14px; font-weight: 600; }
.orders .order {
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--f24-border);
  border-radius: 2px;
  background: var(--f24-white);
}
.orders .order h3 { margin: 0 0 4px; color: var(--f24-dark); font-size: 18px; font-weight: 700; text-transform: none; }
.orders .order .date, .orders .order .total { margin-bottom: 4px; font-size: 15px; }
.order-actions a { display: inline-block; margin: 0 6px; font-weight: 600; }
#order-detail .box, #order-follow .box, #guest-tracking .box, #module-psgdpr-gdpr .box {
  margin: 0 0 24px;
  padding: 20px;
  border: 1px solid var(--f24-border);
  border-radius: 2px;
  background: var(--f24-white);
  box-shadow: none;
}
#order-detail h3, #order-follow h3, #guest-tracking h3 { color: var(--f24-dark); font-size: 20px; font-weight: 700; text-transform: none; }

/* Contact page */
.f24-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
}
.f24-contact h2 { margin: 0 0 16px; color: var(--f24-dark); font-size: 24px; font-weight: 700; text-transform: none; }
.f24-contact-info {
  align-self: start;
  padding: 28px;
  border: 1px solid var(--f24-border);
  border-top: 3px solid var(--f24-dark);
  border-radius: 2px;
  background: var(--f24-bg-soft);
  color: var(--f24-text);
  font-size: 16px;
  line-height: 1.6;
}
.f24-contact-info address { margin: 0 0 20px; font-style: normal; }
.f24-contact-list { margin: 0; }
.f24-contact-list dt {
  margin: 16px 0 2px;
  color: var(--f24-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.f24-contact-list dd { margin: 0; }
.f24-contact-list a { font-weight: 600; }
.f24-contact-form {
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--f24-border);
  border-top: 3px solid var(--f24-primary);
  border-radius: 2px;
  background: var(--f24-white);
}
.f24-contact-form > p { margin: 0 0 16px; font-size: 16px; line-height: 1.6; }
.f24-contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.f24-contact-actions .btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 24px; }
.f24-contact-form-widget { margin: 0; }
.f24-contact-form-widget .form-footer .btn { width: auto; }

@media (min-width: 1024px) {
  .f24-contact { grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr); gap: 40px; }
}

@media (max-width: 1199px) {
  .f24-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  #wrapper-page #main > .page-header h1 { font-size: 28px; }
  .f24-tiles { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .f24-tile { min-height: 88px; padding: 18px; }
  .f24-auth-card { padding: 24px 18px 22px; }
  .f24-contact-info, .f24-contact-form { padding: 20px 18px; }
  .f24-account-logout .btn, .f24-contact-actions .btn { width: 100%; }
  body:is(#authentication, #registration, #password, #identity, #address, #contact) .form-footer .btn,
  body:is(#authentication, #registration, #password, #identity, #address, #contact) .form-footer [type="submit"] { width: 100%; }
  .page-content .table { display: block; overflow-x: auto; }
}
