/* Shared auth page styles (Login/Register/Reset/Confirm/Lockout)
   Goal: preserve existing VV_Login + VV_Register look and reuse it everywhere.
*/

html,
body {
  box-sizing: border-box;
  width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  /* Mechanical, uniform padding on all edges for all auth pages */
  --rc-auth-pad: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.3px;
  background: radial-gradient(
      120% 120% at 50% 0%,
      rgba(46, 204, 113, 0.25),
      rgba(11, 26, 42, 0.95)
    ),
    #0b1a2a !important;
  height: 100svh;
  display: grid;
  place-items: center;
  padding: var(--rc-auth-pad);
  overflow: hidden;
}

/* Base card */
.container.rc-auth-container {
  /* Override global `.container` (public_styles.css) so auth cards behave consistently */
  display: block;
  margin: 0;

  /* Mechanical sizing: fit within the padded body content box */
  width: min(380px, 100%);
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 12px;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px rgba(46, 204, 113, 0.35),
    0 15px 35px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 188, 212, 0.15);
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable both-edges;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  min-height: 0;
}

/*
  IMPORTANT:
  public_styles.css defines global .form-group/.form-label as a horizontal flex row
  with a min-width label. That causes auth forms to overflow on mobile (horizontal
  scrolling) and leads to inconsistent field sizing.
  Force auth forms back to a simple stacked layout.
*/
.container.rc-auth-container .form-group {
  display: block !important;
  align-items: initial !important;
  gap: 0 !important;
  width: 100% !important;
}

.container.rc-auth-container .form-label {
  min-width: 0 !important;
  text-align: left !important;
}

.container.rc-auth-container * {
  box-sizing: border-box;
  max-width: 100%;
}

/* Size variants are intentionally minimized to keep pages mechanically identical. */
.container.rc-auth-container.rc-auth--narrow {
  width: min(380px, 100%);
}

/* Legal pages: same look, wider for readability */
.container.rc-auth-container.rc-auth--legal {
  width: min(920px, 100%);
}

.logo-container {
  text-align: center;
  margin-bottom: 0.25rem;
}

/* Override public_styles.css which sets .logo-container img width=250px */
.logo-container img.centered-logo {
  width: auto;
  height: auto;
}

.centered-logo {
  /* Mechanical, uniform logo sizing across auth pages */
  max-width: 90px;
  height: auto;
}

h2 {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  color: #0097a7;
  margin-bottom: 0.9rem;
  margin-top: 0;
  letter-spacing: 0.5px;
  line-height: 1.4;
}

h3 {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  color: #0097a7;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
  line-height: 1.2;
  margin-top: 0;
}

/* Pre-launch note (registration page): small red text above heading. */
.container.rc-auth-container .rc-prelaunch-note {
  margin: 0.5rem 0 0.75rem;
  font-size: 0.85rem;
  color: #cc3333;
  line-height: 1.35;
}

.container.rc-auth-container .rc-prelaunch-note a {
  color: inherit;
  text-decoration: underline;
}

h4 {
  font-size: 1.2rem;
  font-weight: 700;
  text-align: left;
  color: #1a252f;
  margin-bottom: 1rem;
  margin-top: 0;
  letter-spacing: 0.4px;
}

p {
  font-size: 0.95rem;
  color: #2c3e50;
  line-height: 1.6;
}

.container.rc-auth-container p {
  margin: 0.6rem 0;
}

.form {
  width: 100%;
}

.form-group {
  margin-bottom: 1.75rem;
}

.container.rc-auth-container .form-group {
  margin-bottom: 1.15rem;
}

/* Registration (narrow) has many fields; make it more compact */
/* (no per-page spacing tweaks) */

.form-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a252f;
  margin-bottom: 0.75rem;
  letter-spacing: 0.3px;
}

/* Inputs: support both explicit class and generic form rendering (allauth forms) */
.input-field,
.container.rc-auth-container input[type="email"],
.container.rc-auth-container input[type="password"],
.container.rc-auth-container input[type="text"],
.container.rc-auth-container input[type="tel"],
.container.rc-auth-container select {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid #ddd;
  border-radius: 6px;
  transition: all 0.3s ease;
  background: #fafbfc;
  height: 2.6rem;
  line-height: 1;
  box-sizing: border-box;
}

/* Select elements can render text clipped when a fixed height is combined with
   large vertical padding + a 1.0 line-height (notably on macOS/iOS).
   Keep the overall look, but ensure option/placeholder text is fully visible. */
.container.rc-auth-container select {
  height: 3rem;
  line-height: 1.2;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* Override global public_styles.css password input sizing (it uses !important) */
.container.rc-auth-container input[type="password"] {
  width: 100% !important;
  max-width: 100% !important;
  height: 2.6rem !important;
  padding: 0.875rem 1rem !important;
}

/* Some templates include bootstrap-ish classnames */
.container.rc-auth-container .form-control {
  width: 100% !important;
  max-width: 100% !important;
  height: 2.6rem !important;
  padding: 0.875rem 1rem !important;
}

/* (no per-page input sizing tweaks) */

.input-field:focus,
.container.rc-auth-container input:focus,
.container.rc-auth-container select:focus {
  outline: none;
  border-color: #3498db;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Field-level validation highlight (used on registration to avoid clearing fields on errors) */
.container.rc-auth-container .rc-invalid {
  border-color: #cc3333;
}

.button-container {
  margin-top: 1rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

.button {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(52, 152, 219, 0.4);
}

.form-link {
  text-align: center;
  font-size: 0.95rem;
  color: #2c3e50;
  line-height: 1.6;
  margin: 0.2rem 0;
}

.link {
  color: #2980b9;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.link:hover {
  color: #1a4d8f;
  text-decoration: underline;
}

.alert.error {
  padding: 0.875rem;
  margin-bottom: 1.5rem;
  background-color: #ffeeee;
  color: #cc3333;
  border: 1px solid #ffcccc;
  border-radius: 6px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.alert.error ul {
  margin: 0;
  padding-left: 1.5rem;
}

.alert.error li {
  margin-bottom: 0.5rem;
}

.footer {
  text-align: center;
  font-size: 0.75rem;
  color: #546e7a;
  margin-top: 0.6rem;
  padding: 0.5rem 0 0.2rem;
  border-top: 1px solid #eeeeee;
}

.footer-link {
  color: #2980b9;
  text-decoration: none;
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #1a4d8f;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .container.rc-auth-container {
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 0 0 1px rgba(46, 204, 113, 0.35),
      0 15px 35px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 188, 212, 0.15);
  }

  .container.rc-auth-container p {
    margin: 0.45rem 0;
  }

  h2 {
    font-size: 1.25rem;
    color: #0097a7;
  }
  h4 {
    font-size: 1.1rem;
  }
}

/* ----------------------------
   Mock subscription pricing UI
   ---------------------------- */

.rc-pricing-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.rc-pricing-toggle__option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fafbfc;
  cursor: pointer;
  font-weight: 700;
  color: #1a252f;
  user-select: none;
}

.rc-pricing-toggle__option input {
  margin: 0;
}

.rc-pricing-toggle__savings {
  font-weight: 800;
  color: #0097a7;
}

.rc-pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .container.rc-auth-container .rc-pricing-grid {
    grid-template-columns: 1fr 1fr;
  }


  .container.rc-auth-container .rc-plan-card--club {
    grid-column: 2;
  }
}

.rc-plan-card {
  display: block;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
  cursor: pointer;
  position: relative;
}

.rc-plan-card:hover {
  border-color: rgba(46, 204, 113, 0.35);
}

.rc-plan-card__radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rc-plan-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rc-plan-card__name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1a252f;
}

.rc-plan-card__desc {
  font-size: 0.9rem;
  color: #2c3e50;
  margin-top: 2px;
}

.rc-plan-card__badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(52, 152, 219, 0.35);
  background: rgba(52, 152, 219, 0.08);
  color: #2980b9;
  font-weight: 800;
  font-size: 0.8rem;
  white-space: nowrap;
}

.rc-plan-card__price {
  margin-top: 10px;
}

.rc-price__amt {
  font-size: 1.35rem;
  font-weight: 900;
  color: #0097a7;
}

.rc-price__unit {
  font-weight: 800;
  color: #1a252f;
  margin-left: 2px;
}

.rc-price__sub {
  margin-top: 2px;
  font-size: 0.85rem;
  color: #2c3e50;
}

/* interval-driven visibility */
#rc-mock-billing-form[data-interval="monthly"] .rc-price--annual {
  display: none;
}

#rc-mock-billing-form[data-interval="annual"] .rc-price--monthly {
  display: none;
}

.rc-plan-card__features {
  margin: 10px 0 0 18px;
  padding: 0;
  color: #2c3e50;
  font-size: 0.9rem;
}

.rc-plan-card__req-title {
  margin-top: 10px;
  font-weight: 800;
  color: #1a252f;
  font-size: 0.9rem;
}

.rc-plan-card__requirements {
  margin: 6px 0 0 18px;
  padding: 0;
  color: #2c3e50;
  font-size: 0.9rem;
}

.rc-plan-card:has(input.rc-plan-card__radio:checked) {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.12);
}

/* Fallback for browsers without :has() support */
@supports not selector(:has(*)) {
  .rc-plan-card input.rc-plan-card__radio {
    position: static;
    opacity: 1;
    pointer-events: auto;
    margin-right: 8px;
  }
}

.rc-autorenew {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #1a252f;
}

.rc-autorenew__help {
  margin-top: 4px;
  font-size: 0.85rem;
  color: #2c3e50;
}

/* Small height devices: card already scrolls internally; keep layout mechanical */
@media (max-height: 740px) {
}
