/* PolyProp client portal responsive guardrails — registration, sign-in and reset.
   Scoped to the existing PolyProp account components. No booking/cart styles. */

/* Prevent a wide child or an Elementor/form theme rule from expanding the viewport. */
html body .ppreg,
html body .ppreg-recovery,
html body .ppbc-account-page:has(.ppbc-account-login),
html body .ppbc-account-page:has(.ppreg-recovery),
html body .ppbc-account-login {
  box-sizing: border-box;
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
}
html body .ppreg *,
html body .ppreg *::before,
html body .ppreg *::after,
html body .ppreg-recovery *,
html body .ppreg-recovery *::before,
html body .ppreg-recovery *::after,
html body .ppbc-account-login *,
html body .ppbc-account-login *::before,
html body .ppbc-account-login *::after {
  box-sizing: border-box;
}
html body .ppreg,
html body .ppreg-recovery {
  margin-inline: auto;
  overflow-wrap: anywhere;
  word-break: normal;
}
html body .ppreg p,
html body .ppreg-recovery p,
html body .ppbc-account-login p,
html body .ppreg h1,
html body .ppreg-recovery h2,
html body .ppreg label,
html body .ppreg-recovery label,
html body .ppreg small,
html body .ppreg-recovery small,
html body .ppreg-consent span,
html body .ppbc-account-login label,
html body .ppbc-account-login .ppreg-login-error,
html body .ppbc-account-login .ppreg-login-register {
  max-inline-size: 100%;
  min-inline-size: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

/* Column and grid contents must shrink; a long label/e-mail must not stretch them. */
html body .ppreg .ppreg-grid,
html body .ppreg-recovery form,
html body .ppbc-account-login form,
html body .ppbc-account-login .login-password,
html body .ppbc-account-login .login-username,
html body .ppbc-account-login .login-remember,
html body .ppbc-account-login .login-submit,
html body .ppreg .ppreg-password-wrap,
html body .ppreg-recovery .ppreg-password-wrap,
html body .ppbc-account-login .ppreg-login-password-wrap {
  min-inline-size: 0;
  max-inline-size: 100%;
}
html body .ppreg .ppreg-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
html body .ppreg .ppreg-field,
html body .ppreg-recovery .ppreg-recovery-field {
  min-inline-size: 0;
}
html body .ppreg input:not([type="checkbox"]),
html body .ppreg select,
html body .ppreg textarea,
html body .ppreg-recovery input:not([type="checkbox"]),
html body .ppbc-account-login input:not([type="checkbox"]):not([type="submit"]) {
  display: block;
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  min-block-size: 44px;
  block-size: auto;
  box-sizing: border-box;
  font-size: 16px; /* avoids mobile Safari auto-zoom */
}
html body .ppreg textarea { resize: vertical; }

/* Critical reset action: allow 2+ lines on 280–360 px screens, unlike theme buttons
   that force height:48px / white-space:nowrap / overflow:hidden. */
html body .ppreg button[type="submit"],
html body .ppreg-recovery button[type="submit"],
html body .ppbc-account-login input[type="submit"],
html body .ppbc-account-login button[type="submit"] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  inline-size: 100% !important;
  max-inline-size: 100% !important;
  min-inline-size: 0 !important;
  block-size: auto !important;
  min-block-size: 48px !important;
  padding: 12px 16px !important;
  margin-inline: 0 !important;
  font-size: clamp(14px, 3.9vw, 16px) !important;
  font-weight: 700;
  line-height: 1.4 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  text-align: center !important;
  border-radius: 9px;
  cursor: pointer;
}
html body .ppreg button[type="submit"]:focus-visible,
html body .ppreg-recovery button[type="submit"]:focus-visible,
html body .ppbc-account-login input[type="submit"]:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 3px;
}

/* Eye buttons are not submits: keep touch target ≥44px without moving password text. */
html body .ppreg .ppreg-password-wrap input,
html body .ppreg-recovery .ppreg-password-wrap input,
html body .ppbc-account-login .ppreg-login-password-wrap input {
  padding-inline-end: 58px !important;
}
html body .ppreg .ppreg-password-toggle,
html body .ppreg-recovery .ppreg-password-toggle,
html body .ppbc-account-login .ppreg-login-password-toggle {
  position: absolute;
  inset-inline-end: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: flex !important;
  justify-content: center;
  align-items: center;
  inline-size: 44px !important;
  block-size: 44px !important;
  min-inline-size: 44px !important;
  min-block-size: 44px !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  white-space: nowrap;
  overflow: visible;
  flex-shrink: 0;
}
html body .ppreg .ppreg-consent {
  align-items: flex-start;
  flex-wrap: nowrap;
  min-inline-size: 0;
}
html body .ppreg .ppreg-consent input[type="checkbox"] {
  flex: 0 0 auto;
  inline-size: 18px;
  block-size: 18px;
  margin: 3px 0 0;
}
html body .ppreg .ppreg-consent span { flex: 1 1 auto; }

/* The legacy booking login form may have plugin-defined fixed widths. */
html body .ppbc-account-login .login-submit,
html body .ppbc-account-login .login-username,
html body .ppbc-account-login .login-password,
html body .ppbc-account-login .login-remember {
  inline-size: 100%;
  max-inline-size: 100%;
}
html body .ppbc-account-login .login-submit input[type="submit"] {
  -webkit-appearance: none;
  appearance: none;
}
html body .ppreg-recovery .ppreg-recovery-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  min-inline-size: 0;
  max-inline-size: 100%;
}
html body .ppreg-recovery .ppreg-recovery-links a { display: inline-block; min-inline-size: 0; }

@media (max-width: 700px) {
  html body .ppreg,
  html body .ppreg-recovery {
    padding: clamp(16px, 4vw, 26px);
    margin-block: 12px 24px;
  }
  html body .ppreg .ppreg-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  html body .ppreg .ppreg-full { grid-column: auto; }
}
@media (max-width: 380px) {
  html body .ppreg,
  html body .ppreg-recovery {
    padding: 16px 12px;
    border-radius: 12px;
  }
  html body .ppreg-recovery button[type="submit"],
  html body .ppreg button[type="submit"] {
    padding: 12px 10px !important;
  }
  html body .ppreg h1 { font-size: 26px; line-height: 1.2; }
  html body .ppreg-recovery h2 { font-size: 24px; line-height: 1.25; }
}
@media (prefers-reduced-motion: reduce) {
  html body .ppreg button,
  html body .ppreg-recovery button,
  html body .ppbc-account-login button,
  html body .ppbc-account-login input[type="submit"] {
    transition: none !important;
  }
}


/* Logged-in PolyProp customer dashboard (also belongs to /mon-compte/).
   This part intentionally does not affect the booking calendar or the cart. */
html body .ppbc-account-page--tabs,
html body .ppbc-account-page--tabs .ppbc-account-header,
html body .ppbc-account-page--tabs .ppbc-account-panel,
html body .ppbc-account-page--tabs .ppbc-account-section-card,
html body .ppbc-account-page--tabs .ppbc-account-form,
html body .ppbc-account-page--tabs .ppbc-account-form__actions,
html body .ppbc-account-page--tabs .ppbc-form-grid,
html body .ppbc-account-page--tabs .ppbc-account-tabs,
html body .ppbc-account-page--tabs .ppbc-account-tabs button,
html body .ppbc-account-page--tabs .ppbc-account-order,
html body .ppbc-account-page--tabs .ppbc-account-order__grid,
html body .ppbc-account-page--tabs .ppbc-account-order__actions,
html body .ppbc-account-page--tabs .ppbc-account-status-summary,
html body .ppbc-account-page--tabs .ppbc-danger-zone,
html body .ppbc-account-page--tabs .ppbc-account-delete-modal__dialog,
html body .ppbc-account-page--tabs .ppbc-account-delete-modal__actions {
  min-inline-size: 0;
  max-inline-size: 100%;
  box-sizing: border-box;
}
html body .ppbc-account-page--tabs :is(h2, h3, h4, p, strong, small, label, .ppbc-account-tab__label) {
  overflow-wrap: anywhere;
  word-break: normal;
  min-inline-size: 0;
}
html body .ppbc-account-page--tabs :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  box-sizing: border-box;
  min-inline-size: 0;
  max-inline-size: 100%;
}
html body .ppbc-account-page--tabs :is(
  .ppbc-account-form__actions .ppbc-btn,
  .ppbc-account-header .ppbc-account-logout,
  .ppbc-account-delete-modal__actions .ppbc-btn,
  .ppbc-account-order__actions .ppbc-btn,
  .ppbc-danger-zone button,
  .ppbc-account-tabs button
) {
  min-inline-size: 0;
  max-inline-size: 100%;
  block-size: auto !important;
  min-block-size: 44px;
  line-height: 1.4 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  text-overflow: clip !important;
  text-align: center;
  padding-block: 11px;
}
html body .ppbc-account-page--tabs .ppbc-form-grid,
html body .ppbc-account-page--tabs .ppbc-account-order__grid,
html body .ppbc-account-page--tabs .ppbc-account-delete-modal__actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
html body .ppbc-account-page--tabs .ppbc-account-tabs {
  grid-template-columns: repeat(3, minmax(0,1fr));
}
html body .ppbc-account-page--tabs .ppbc-account-tabs button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
@media (max-width: 700px) {
  html body .ppbc-account-page--tabs .ppbc-account-tabs,
  html body .ppbc-account-page--tabs .ppbc-form-grid,
  html body .ppbc-account-page--tabs .ppbc-account-order__grid,
  html body .ppbc-account-page--tabs .ppbc-account-delete-modal__actions {
    grid-template-columns: minmax(0, 1fr);
  }
  html body .ppbc-account-page--tabs .ppbc-account-header,
  html body .ppbc-account-page--tabs .ppbc-danger-zone {
    flex-direction: column;
    align-items: stretch;
  }
  html body .ppbc-account-page--tabs .ppbc-account-header .ppbc-account-logout {
    width: 100%;
    text-align: center;
  }
  html body .ppbc-account-page--tabs .ppbc-account-tabs button {
    justify-content: flex-start;
  }
}
@media (max-width: 380px) {
  html body .ppbc-account-page--tabs .ppbc-account-header,
  html body .ppbc-account-page--tabs .ppbc-account-panel,
  html body .ppbc-account-page--tabs .ppbc-account-section-card {
    padding: 12px !important;
  }
}
