/* ══════════════════════════════════════════════════════════════════
   sdpPages.css — Styles for public-facing Visualforce pages
   Loaded after main.css and sdpvfstyling.css.
   ══════════════════════════════════════════════════════════════════ */

/* ─── sdpPublicHeader.component ──────────────────────────────── */
.sd-public-header.header-has-logo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #750000;
  padding: 0 1rem;
  height: 3rem;
  box-sizing: border-box;
}
.sdph-brand-logo { display: flex; align-items: center; }
.sdph-brand-logo img { width: 12.5rem; }
#sdphLocaleMenu { list-style: none; margin: 0; padding: 0; position: relative; }
.sdph-locale-toggle {
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0;
}
.sdph-locale-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  min-width: 9rem;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  padding: 0.25rem 0;
}
#sdphLocaleMenu.open .sdph-locale-dropdown { display: block; }
.sdph-locale-item {
  display: block;
  width: 100%;
  padding: 0.4rem 1rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 16px;
  color: #333;
  box-sizing: border-box;
}
.sdph-locale-item:hover { background: #f5f5f5; }

/* ─── sdpCheckbox.component ──────────────────────────────────── */
.sdp-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}
.sdp-checkbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.sdp-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  top: 0; left: 0;
  margin: 0; padding: 0;
  cursor: pointer;
  z-index: 1;
}
.sdp-checkbox-off { display: block; color: rgba(0,0,0,0.54); }
.sdp-checkbox-on  { display: none;  color: var(--wp-red); }
.sdp-checkbox input:checked ~ .sdp-checkbox-off { display: none; }
.sdp-checkbox input:checked ~ .sdp-checkbox-on  { display: block; }
.sdp-checkbox input:focus-visible ~ svg {
  outline: 2px solid var(--wp-red);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ─── sdpFooter.component ────────────────────────────────────── */
.sd-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 1rem;
  font-size: 14px;
  color: var(--wp-white);
  background: var(--wp-dark-grey);
  gap: 0.5rem;
  box-sizing: border-box;
}
.sd-footer a { color: var(--wp-white); text-decoration: underline; }
.sd-footer a:hover { opacity: 0.8; }
@media screen and (max-width: 768px) {
  .sd-footer { gap: 4px; }
  .sd-footer .sd-footer-links {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 2px;
  }
  .sd-footer .sd-footer-links a,
  .sd-footer .sd-footer-links span,
  .sd-footer .sd-footer-copyright { font-size: .625rem; }
}

/* ─── EULA dialog (sdpFooter.component / sdpLogin.page) ───────── */
.eula-dialog-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
}
/* Mounting the backdrop is a hard cut (no fade) - only the dialog itself animates. */
.eula-dialog-backdrop.eula-dialog-visible { display: flex; }
.eula-dialog {
  background: #fff;
  border-radius: 4px;
  box-shadow:
    0 11px 15px -7px rgba(0, 0, 0, 0.2),
    0 24px 38px 3px rgba(0, 0, 0, 0.14),
    0 9px 46px 8px rgba(0, 0, 0, 0.12);
  width: 100%;
  max-width: 900px;
  height: 85vh;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  transform: scale(0.75);
  opacity: 0;
  transition:
    transform 225ms cubic-bezier(0.4, 0, 0.2, 1),
    opacity 225ms cubic-bezier(0.4, 0, 0.2, 1);
}
.eula-dialog-backdrop.eula-dialog-open .eula-dialog {
  transform: scale(1);
  opacity: 1;
}
.eula-dialog-body { flex: 1; min-height: 0; }
.eula-dialog-iframe { display: block; width: 100%; height: 100%; border: none; }
.eula-dialog-footer {
  display: flex;
  justify-content: flex-end;
  padding: 1.5rem;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}
.eula-dialog-footer .sd-button {
  border: none;
  border-radius: 4px;
  color: var(--wp-white);
  font-size: 0.95rem;
  cursor: pointer;
}
@media (max-width: 768px) {
  .eula-dialog-backdrop { padding: 0; }
  .eula-dialog {
    max-width: 100%;
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .eula-dialog { transition-duration: 0ms; }
}

/* ─── sdpPasswordField.component ─────────────────────────────── */
.sdp-password-wrapper { position: relative; }
.sdp-password-wrapper input[type=password],
.sdp-password-wrapper input[type=text] { padding-right: 2.5rem; }
.sdp-show-psw-btn {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: #666;
  display: flex;
  align-items: center;
}
.sdp-eye-off { display: block; }
.sdp-eye-on  { display: none; }

/* ─── New-mode page shell ─────────────────────────────────────────
   Shared by sdpLogin, sdpExpiredToken, sdpForgotPassword,
   sdpForgotPasswordSuccess
   ──────────────────────────────────────────────────────────────── */
html, body { height: 100%; margin: 0; padding: 0; }
body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}
.login-screen-wrapper {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  font-size: 14px;
  background: #f5f5f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
}
.login-screen-inner {
  margin: 0;
  padding: 1.5rem 0 2rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.login-screen-inner.login-centered { margin: auto 0; padding: 0; }
.login-screen-header {
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-screen-header img { width: 16.5rem; height: auto; padding: 1rem; }

/* ─── fp-box: card used by expired-token and forgot-password pages */
.fp-box {
  background: #fff;
  border-radius: 0.5rem;
  padding: 2rem 2.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  box-sizing: border-box;
  width: 100%;
  max-width: 38rem;
}
@media (max-width: 768px) {
  .fp-box { max-width: 100%; border-radius: 0; padding: 1.5rem; }
}
.fp-box h4 {
  color: var(--bs-heading-color);
  font-weight: 500;
  line-height: 1.2;
  font-size: 1.4rem;
  margin-bottom: .5rem;
  margin-top: 0;
}
.fp-body { color: #333; line-height: 1.6; margin: 0 0 0.85rem; text-align: center; }
.fp-box .login-creds-statement { text-align: center; }
.fp-body a { color: var(--wp-link-blue); text-decoration: underline; }
.fp-divider { border: none; border-top: 1px solid #ddd; margin: 1.5rem 0; }
.fp-box .login-form-actions { margin-top: 1rem; text-align: center; }
.fp-box .login-field { width: 100%; max-width: 25rem; margin: 0 auto; }
/* expired-token page only: login-creds-statement's own margin-bottom would double up
   with login-form-grid's gap, making the note-to-field space wider than field-to-button */
.login-creds-statement.expired-token-note { margin-bottom: 0; }
.fp-forgot-userid { margin-bottom: 1.25rem; text-align: center; }
.fp-section-heading { text-align: center; }
.fp-forgot-userid p { color: #555; line-height: 1.6; margin: 0 0 0.5rem; }
.fp-forgot-userid a { color: var(--wp-link-blue); text-decoration: underline; }

/* ─── Shared form styles ─────────────────────────────────────────
   Used across multiple pages
   ──────────────────────────────────────────────────────────────── */
.login-form-title {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 0.75rem;
  color: #750000;
}
.login-creds-statement { color: #555; margin: 0 0 1rem; line-height: 1.5; }
.login-form-grid { display: flex; flex-direction: column; gap: 1rem; }
.login-field input[type=text],
.login-field input[type=password] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.25rem 0.75rem;
  border: 2px solid var(--wp-dark-grey);
  border-radius: 4px;
  outline: none;
}
.login-field input[type=text]:focus,
.login-field input[type=password]:focus { border-color: #1976d2; }
.login-field input.field-error { border-color: var(--wp-error-red) !important; }
.login-field input.field-error::placeholder { color: var(--wp-error-red); }
.field-required-msg { display: none; color: var(--wp-error-red); font-size: 0.75rem; margin-top: 0.2rem; }
.field-required-msg.visible { display: block; }
.login-form-actions { margin-bottom: 0; }
.login-page-error {
  font-weight: 400;
  font-size: 0.875rem;
  line-height: 1.43;
  letter-spacing: 0.01071em;
  display: flex;
  align-items: center;
  color: rgb(95, 33, 32);
  background-color: rgb(253, 237, 237);
  transition: box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 4px;
  padding: 6px 16px;
  margin-bottom: 1rem;
}
.login-page-error-icon { flex-shrink: 0; width: 1.25rem; height: 1.25rem; margin-right: 1rem; }
.login-page-error h4 {
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.43;
  letter-spacing: 0.01071em;
  color: rgb(95, 33, 32);
}
.sd-button { background-color: var(--wp-button-blue); padding: 0.5rem 1rem; }
a.sd-button {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  color: var(--wp-white);
}
.errorMsg, .warningMsg { font-size: 14px; }

/* ─── sdpChangePassword.page ─────────────────────────────────── */
.sd-change-password .wrapper { max-width: 22rem; margin: 0 auto; }
.password-wrapper { max-width: 100%; }

/* ─── sdpForgotPassword.page (legacy) ────────────────────────── */
.wrapper.sd-forgot-password { max-width: 25rem; margin: 0 auto; align-items: center; }

/* ─── sdpChangePassword.page ─────────────────────────────────── */
.password-feedback-preamble { max-width: 100%; }

/* ─── sdpLogin.page ──────────────────────────────────────────── */
.messageTable { width: 25rem; }
.messageText h4 { font-size: 1.1rem; }

/* sdpLogin.page (legacy) */
.wrapper.sd-login { align-items: center; }

.box-with-sidecar {
  display: flex;
  align-items: flex-start;
  width: 100%;
  max-width: 60rem;
}
.login-box {
  background: var(--wp-dark-grey);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  box-sizing: border-box;
  max-width: 25rem;
}
.login-box .login-form-actions .sd-button { width: 8rem; }
.login-remember { margin-bottom: 0.75rem; }
.login-forgot-link { margin: 0; }
.login-forgot-link a { color: var(--wp-link-blue); text-decoration: underline; }
.login-eula { color: #444; margin-bottom: 1rem; line-height: 1.4; }
.login-eula a { color: var(--wp-red); text-decoration: underline; }
.help-links { margin-top: 1.25rem; }
.help-links p { color: #333; line-height: 1.5; margin: 0 0 0.85rem; }
.help-links a { color: var(--wp-link-blue); text-decoration: underline; }
.sidecar {
  font-size: 16px;
  flex: 1;
  background: #7a1016;
  color: #fff;
  border-radius: 0 .25rem .25rem 0;
  padding: 1.25rem 1.5rem;
  line-height: 1.5;
}
.sidecar a { color: #ffcccc; text-decoration: underline; }
.sidecar img { max-width: 100%; border-radius: 0.25rem; margin-bottom: 0.75rem; }
.sidecar ul { padding-left: 1.25rem; margin: 0.5rem 0 0; }
.sidecar li { margin-bottom: 0.25rem; }
@media (max-width: 768px) {
  .box-with-sidecar { flex-direction: column; align-items: center; max-width: 400px; }
  .login-box { flex: none; width: 100%; }
  .sidecar { width: 100%; }
}
@media (max-width: 400px) {
  .box-with-sidecar { max-width: 100%; }
}
