/* ==========================================================================
   rb-2040-forms.css — RingBD 2040 premium form system (WEB, Sunshine theme)
   2026-11-23 · FORMS 2040 PREMIUM launch · Dipu order: ALL forms to 2040
   Scope: login, register, forgot/reset password, settings (all), search
   (page + header box), modal forms. Post-create / composer EXCLUDED
   (composer worker owns publisher-box; no selector here targets it).
   Load: UNCONDITIONAL link in container.phtml (after the non-welcome
   guard close) so welcome pages get it too — the 9 other rb-2040 sheets
   are guard-gated and never load on welcome.
   Tokens: uses var(--rb-*) from rb-2040-tokens.css on authed pages; the
   :root fallback block below re-declares the SAME values (KEPT tokens)
   so welcome pages render identically before tokens.css loads.
   Rule: no hex literal outside the :root fallback declarations.
   ========================================================================== */

/* ---- Fallback token values (identical to rb-2040-tokens.css KEPT) ---- */
:root {
  --rb-brand-500: #00A651;
  --rb-brand-600: #008A44;
  --rb-brand-700: #006A4E;
  --rb-white: #FFFFFF;
  --rb-surface: #FFFFFF;
  --rb-background: #F0F2F5;
  --rb-surface-2: #E4E6EB;
  --rb-border: #E0E3E7;
  --rb-divider: #EBEDF0;
  --rb-ink-900: #111827;
  --rb-ink-700: #374151;
  --rb-ink-500: #6B7280;
  --rb-ink-400: #9CA3AF;
  --rb-error: #D92D20;
  --rb-flag-red-50: #FDECEF;
  --rb-success: #00A651;
  --rb-warning: #DC6803;
  --rb-font-display: "Baloo Da 2", "Noto Sans Bengali", system-ui, sans-serif;
  --rb-font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rb-space-2: 8px;
  --rb-space-3: 12px;
  --rb-space-4: 16px;
  --rb-space-5: 20px;
  --rb-radius-md: 12px;
  --rb-radius-full: 999px;
  --rb-elev-1: 0 1px 3px rgba(0, 0, 0, 0.08);
  --rb-elev-2: 0 2px 8px rgba(0, 0, 0, 0.1);
  --rb-motion-fast: 150ms;
  --rb-motion-base: 250ms;
  --rb-ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
  --rb-gradient-primary: linear-gradient(180deg, #00A651 0%, #008A44 100%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --rb-surface: #111C2E;
    --rb-background: #0B1220;
    --rb-surface-2: #1A2A42;
    --rb-border: #24344D;
    --rb-divider: #1C2A40;
    --rb-ink-900: #F3F6F9;
    --rb-ink-700: #C7D0DC;
    --rb-ink-500: #8A97A8;
    --rb-ink-400: #5F6E82;
  }
}

/* ==========================================================================
   1. BASE FIELD — every text-like input, select, textarea in form scopes
   Scopes: welcome (.login_innre covers login/register/forgot/reset/
   confirm-sms/unusual-login), settings (.wow_form_fields, .setting-well,
   form[class*="setting-"]), search (#search_form, header #navbar-searchbox),
   modal forms (.modal-body form). Composer never matches these scopes.
   ========================================================================== */
.login_innre input[type="text"],
.login_innre input[type="password"],
.login_innre input[type="email"],
.login_innre input[type="tel"],
.login_innre input[type="number"],
.login_innre input[type="search"],
.login_innre input[type="url"],
.login_innre input[type="date"],
.login_innre select,
.login_innre textarea,
.wow_form_fields input[type="text"],
.wow_form_fields input[type="password"],
.wow_form_fields input[type="email"],
.wow_form_fields input[type="tel"],
.wow_form_fields input[type="number"],
.wow_form_fields input[type="search"],
.wow_form_fields input[type="url"],
.wow_form_fields input[type="date"],
.wow_form_fields select,
.wow_form_fields textarea,
.setting-well input[type="text"],
.setting-well input[type="password"],
.setting-well input[type="email"],
.setting-well input[type="tel"],
.setting-well input[type="number"],
.setting-well input[type="search"],
.setting-well input[type="url"],
.setting-well input[type="date"],
.setting-well select,
.setting-well textarea,
#search_form input[type="text"],
#search_form input[type="search"],
#search_form select,
#search_form textarea,
.modal-body form input[type="text"],
.modal-body form input[type="password"],
.modal-body form input[type="email"],
.modal-body form input[type="tel"],
.modal-body form input[type="number"],
.modal-body form select,
.modal-body form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  font-family: var(--rb-font-body);
  font-size: 15px;
  line-height: 1.45;
  color: var(--rb-ink-900);
  background-color: var(--rb-surface);
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius-md);
  box-shadow: none;
  outline: none;
  transition: border-color var(--rb-motion-fast) var(--rb-ease-out-cubic),
    box-shadow var(--rb-motion-fast) var(--rb-ease-out-cubic),
    background-color var(--rb-motion-fast) var(--rb-ease-out-cubic);
  -webkit-appearance: none;
  appearance: none;
}
.login_innre select,
.wow_form_fields select,
.setting-well select,
#search_form select,
.modal-body form select {
  padding-right: 40px;
  cursor: pointer;
  background-image: none;
}
.login_innre textarea,
.wow_form_fields textarea,
.setting-well textarea,
#search_form textarea,
.modal-body form textarea {
  min-height: 96px;
  resize: vertical;
}

/* Beat style.css:112 (.setting-well input{height:30px!important;...}) */
.setting-well input[type="text"],
.setting-well input[type="password"],
.setting-well input[type="email"],
.setting-well input[type="tel"],
.setting-well input[type="number"],
.setting-well input[type="search"],
.setting-well input[type="url"],
.setting-well input[type="date"],
.setting-well select {
  height: 48px !important;
  min-height: 48px !important;
  font-size: 15px !important;
  color: var(--rb-ink-900) !important;
  background-color: var(--rb-surface) !important;
  border: 1px solid var(--rb-border) !important;
  border-radius: var(--rb-radius-md) !important;
  box-shadow: none !important;
}

/* ---- Placeholders ---- */
.login_innre input::placeholder,
.wow_form_fields input::placeholder,
.setting-well input::placeholder,
#search_form input::placeholder,
.modal-body form input::placeholder,
.login_innre textarea::placeholder,
.wow_form_fields textarea::placeholder,
.setting-well textarea::placeholder,
#search_form textarea::placeholder,
.modal-body form textarea::placeholder {
  color: var(--rb-ink-400);
  opacity: 1;
}

/* ---- Focus ring (one system, every form) ---- */
.login_innre input:focus,
.login_innre select:focus,
.login_innre textarea:focus,
.wow_form_fields input:focus,
.wow_form_fields select:focus,
.wow_form_fields textarea:focus,
.setting-well input:focus,
.setting-well select:focus,
.setting-well textarea:focus,
#search_form input:focus,
#search_form select:focus,
#search_form textarea:focus,
.modal-body form input:focus,
.modal-body form select:focus,
.modal-body form textarea:focus,
#navbar-searchbox .search-input:focus {
  border-color: var(--rb-brand-600);
  box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.18);
  outline: none;
}
.login_innre input:focus-visible,
.login_innre select:focus-visible,
.login_innre textarea:focus-visible,
.wow_form_fields input:focus-visible,
.wow_form_fields select:focus-visible,
.wow_form_fields textarea:focus-visible,
.setting-well input:focus-visible,
.setting-well select:focus-visible,
.setting-well textarea:focus-visible,
#search_form input:focus-visible,
#search_form select:focus-visible,
#search_form textarea:focus-visible {
  border-color: var(--rb-brand-600);
  box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.18);
  outline: none;
}

/* ---- Disabled / readonly ---- */
.login_innre input:disabled,
.wow_form_fields input:disabled,
.setting-well input:disabled,
#search_form input:disabled,
.modal-body form input:disabled,
.login_innre select:disabled,
.wow_form_fields select:disabled,
.setting-well select:disabled,
#search_form select:disabled,
.login_innre textarea:disabled,
.wow_form_fields textarea:disabled {
  background-color: var(--rb-surface-2);
  color: var(--rb-ink-400);
  border-color: var(--rb-divider);
  cursor: not-allowed;
}
.login_innre input[readonly],
.wow_form_fields input[readonly],
#search_form input[readonly] {
  background-color: var(--rb-surface-2);
  color: var(--rb-ink-700);
  cursor: text;
}

/* ==========================================================================
   2. LABELS + FIELD SPACING
   ========================================================================== */
.wow_form_fields label,
.setting-well label,
#search_form label,
.login_innre label,
.modal-body form label {
  display: block;
  margin-bottom: var(--rb-space-2);
  font-family: var(--rb-font-display);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--rb-ink-700);
}
.wow_form_fields label .optional,
.setting-well label .optional {
  font-weight: 400;
  color: var(--rb-ink-400);
}
.login_innre .form-group,
.wow_form_fields,
.setting-well .form-group,
#search_form .form-group,
.modal-body form .form-group {
  margin-bottom: var(--rb-space-4);
}
.login_innre .form-group:last-child,
.wow_form_fields.mb-0 {
  margin-bottom: 0;
}

/* Welcome hero copy — display font, premium hierarchy */
.login_innre p.title {
  font-family: var(--rb-font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--rb-ink-900);
}
.login_innre p.desc {
  font-family: var(--rb-font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--rb-ink-500);
}
.login_innre p.desc a {
  font-weight: 600;
  color: var(--rb-brand-600);
}

/* ==========================================================================
   3. CHECKBOXES + RADIOS
   Native boxes get the brand accent; Wowonder's custom round-check and
   wo_radio_btn keep their structure, recoloured from blue to brand green.
   ========================================================================== */
.login_innre input[type="checkbox"],
.login_innre input[type="radio"],
.wow_form_fields input[type="checkbox"],
.wow_form_fields input[type="radio"],
.setting-well input[type="checkbox"],
.setting-well input[type="radio"],
#search_form input[type="checkbox"],
#search_form input[type="radio"],
.modal-body form input[type="checkbox"],
.modal-body form input[type="radio"] {
  width: 20px;
  height: 20px;
  min-height: 0;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--rb-brand-500);
  cursor: pointer;
  vertical-align: middle;
}
.login_innre input[type="checkbox"] + label,
.login_innre input[type="radio"] + label,
.wow_form_fields input[type="checkbox"] + label,
.wow_form_fields input[type="radio"] + label,
#search_form input[type="checkbox"] + label,
#search_form input[type="radio"] + label {
  display: inline-block;
  margin-bottom: 0;
  margin-left: var(--rb-space-2);
  font-family: var(--rb-font-body);
  font-size: 14px;
  font-weight: 400;
  vertical-align: middle;
  cursor: pointer;
}
/* remember-me / accept-terms rows: tidy inline alignment */
.login_innre .form-group label[for="remember_device"],
.login_innre .form-group label[for="accept_terms"] {
  display: inline-flex;
  align-items: center;
  gap: var(--rb-space-2);
}
/* Custom round checks — brand green replaces style.css #008aff blue */
.round-check input[type="checkbox"]:checked + label::before,
.round-check input[type="radio"]:checked + label::before {
  background: var(--rb-brand-500);
  border-color: transparent;
}
.round-check input[type="checkbox"]:checked + label::after,
.round-check input[type="radio"]:checked + label::after {
  color: var(--rb-white);
}
.round-check input[type="checkbox"]:focus-visible + label::before,
.round-check input[type="radio"]:focus-visible + label::before {
  box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.18);
}
/* wo_radio_btn big-circle picks */
.wo_radio_btn input[type="radio"]:checked + span {
  background-color: var(--rb-brand-500);
}
.wo_radio_btn input[type="radio"]:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.18);
}

/* ==========================================================================
   4. BUTTONS (form scope only — .btn-main elsewhere untouched)
   ========================================================================== */
.login_innre form .btn.btn-main,
.login_innre form .btn.btn-default,
.wow_form_fields .btn.btn-main,
.setting-well form .btn.btn-main,
.setting-well form .btn.btn-default,
#search_form .btn.btn-main,
#search_form .btn.btn-default,
.modal-body form .btn.btn-main,
.modal-body form .btn.btn-default,
form.x_chooser .btn.btn-main {
  min-height: 48px;
  padding: 12px 24px;
  font-family: var(--rb-font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.01em;
  border-radius: var(--rb-radius-md);
  box-shadow: var(--rb-elev-1);
  transition: transform var(--rb-motion-fast) var(--rb-ease-out-cubic),
    box-shadow var(--rb-motion-fast) var(--rb-ease-out-cubic),
    background-color var(--rb-motion-fast) var(--rb-ease-out-cubic),
    opacity var(--rb-motion-fast) var(--rb-ease-out-cubic);
}
.login_innre form .btn.btn-main,
.wow_form_fields .btn.btn-main,
.setting-well form .btn.btn-main,
#search_form .btn.btn-main,
.modal-body form .btn.btn-main,
form.x_chooser .btn.btn-main {
  color: var(--rb-white);
  background: var(--rb-gradient-primary);
  border: 1px solid transparent;
}
.login_innre form .btn.btn-main:hover,
.wow_form_fields .btn.btn-main:hover,
.setting-well form .btn.btn-main:hover,
#search_form .btn.btn-main:hover,
.modal-body form .btn.btn-main:hover,
form.x_chooser .btn.btn-main:hover {
  transform: translateY(-1px);
  box-shadow: var(--rb-elev-2);
}
.login_innre form .btn.btn-main:active,
.wow_form_fields .btn.btn-main:active,
.setting-well form .btn.btn-main:active,
#search_form .btn.btn-main:active,
.modal-body form .btn.btn-main:active,
form.x_chooser .btn.btn-main:active {
  transform: translateY(0);
  box-shadow: var(--rb-elev-1);
}
.login_innre form .btn.btn-main:focus-visible,
.wow_form_fields .btn.btn-main:focus-visible,
.setting-well form .btn.btn-main:focus-visible,
#search_form .btn.btn-main:focus-visible,
.modal-body form .btn.btn-main:focus-visible,
form.x_chooser .btn.btn-main:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.35);
}
.login_innre form .btn.btn-main:disabled,
.wow_form_fields .btn.btn-main:disabled,
.setting-well form .btn.btn-main:disabled,
#search_form .btn.btn-main:disabled,
.modal-body form .btn.btn-main:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--rb-elev-1);
}
/* Secondary / cancel buttons inside forms */
.login_innre form .btn.btn-default,
.setting-well form .btn.btn-default,
#search_form .btn.btn-default {
  color: var(--rb-ink-900);
  background-color: var(--rb-surface);
  border: 1px solid var(--rb-border);
}
.login_innre form .btn.btn-default:hover,
.setting-well form .btn.btn-default:hover,
#search_form .btn.btn-default:hover {
  background-color: var(--rb-surface-2);
  transform: translateY(-1px);
  box-shadow: var(--rb-elev-2);
}
/* Welcome primary actions read as full-width on all sizes */
.login_innre form#login .btn.btn-main,
.login_innre form#register .btn.btn-main,
.login_innre form#forgot-form .btn.btn-main,
.login_innre form#forgot-form-sms .btn.btn-main,
.login_innre form#reset-form .btn.btn-main {
  width: 100%;
}

/* ==========================================================================
   5. VALIDATION + ERROR STATES
   ========================================================================== */
.login_innre .errors,
.wow_form_fields .errors,
.setting-well .errors,
#search_form .errors,
.modal-body form .errors,
.login_innre form .alert-danger,
.wow_form_fields .alert-danger,
.setting-well .alert-danger,
#search_form .alert-danger,
.modal-body form .alert-danger {
  padding: 12px 16px;
  margin-bottom: var(--rb-space-4);
  font-family: var(--rb-font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--rb-error);
  background-color: var(--rb-flag-red-50);
  border: 1px solid var(--rb-error);
  border-radius: var(--rb-radius-md);
}
.login_innre form .alert-success,
.wow_form_fields .alert-success,
.setting-well .alert-success {
  padding: 12px 16px;
  margin-bottom: var(--rb-space-4);
  font-family: var(--rb-font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--rb-success);
  background-color: var(--rb-surface);
  border: 1px solid var(--rb-success);
  border-radius: var(--rb-radius-md);
}
/* Field-level invalid: brand error border + soft tint */
.login_innre input[aria-invalid="true"],
.wow_form_fields input[aria-invalid="true"],
.setting-well input[aria-invalid="true"],
#search_form input[aria-invalid="true"],
.modal-body form input[aria-invalid="true"],
.login_innre textarea[aria-invalid="true"],
.wow_form_fields textarea[aria-invalid="true"],
.login_innre select[aria-invalid="true"],
.wow_form_fields select[aria-invalid="true"],
.has-error input,
.has-error select,
.has-error textarea {
  border-color: var(--rb-error);
  background-color: var(--rb-flag-red-50);
}
.login_innre input[aria-invalid="true"]:focus,
.wow_form_fields input[aria-invalid="true"]:focus,
.setting-well input[aria-invalid="true"]:focus,
#search_form input[aria-invalid="true"]:focus,
.has-error input:focus,
.has-error select:focus,
.has-error textarea:focus {
  border-color: var(--rb-error);
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.16);
}
.has-error .help-block,
.help-block.text-danger,
.invalid-feedback {
  display: block;
  margin-top: 6px;
  font-family: var(--rb-font-body);
  font-size: 13px;
  line-height: 1.45;
  color: var(--rb-error);
}
.help-block {
  display: block;
  margin-top: 6px;
  font-family: var(--rb-font-body);
  font-size: 13px;
  line-height: 1.45;
  color: var(--rb-ink-500);
}

/* ==========================================================================
   6. SEARCH — page filter form + header box
   ========================================================================== */
#search_form #query {
  border-radius: var(--rb-radius-full);
  padding-left: var(--rb-space-5);
  padding-right: var(--rb-space-5);
}
#search_form .age_number {
  border-radius: var(--rb-radius-md);
}
/* Header search stays compact: 40px pill on surface-2, lifts on focus.
   A-04 fix 2026-11-28: left padding 16px put typed text under the 20px
   magnifier icon (absolute at left:7px, ends x+27 -- style.css:428);
   36px clears it with a 9px gap. */
#navbar-searchbox .search-input {
  box-sizing: border-box;
  height: 40px;
  min-height: 40px;
  padding: 8px 16px 8px 36px;
  font-family: var(--rb-font-body);
  font-size: 14px;
  color: var(--rb-ink-900);
  background-color: var(--rb-surface-2);
  border: 1px solid transparent;
  border-radius: var(--rb-radius-full);
  box-shadow: none;
  outline: none;
  transition: border-color var(--rb-motion-fast) var(--rb-ease-out-cubic),
    box-shadow var(--rb-motion-fast) var(--rb-ease-out-cubic),
    background-color var(--rb-motion-fast) var(--rb-ease-out-cubic);
}
#navbar-searchbox .search-input::placeholder {
  color: var(--rb-ink-400);
  opacity: 1;
}
#navbar-searchbox .search-input:focus {
  background-color: var(--rb-surface);
  border-color: var(--rb-brand-600);
}

/* ==========================================================================
   7. MOBILE 390 — 16px inputs (no iOS zoom), full-width welcome CTAs
   ========================================================================== */
@media (max-width: 600px) {
  .login_innre input[type="text"],
  .login_innre input[type="password"],
  .login_innre input[type="email"],
  .login_innre input[type="tel"],
  .login_innre input[type="number"],
  .login_innre input[type="search"],
  .login_innre input[type="url"],
  .login_innre input[type="date"],
  .login_innre select,
  .login_innre textarea,
  .wow_form_fields input[type="text"],
  .wow_form_fields input[type="password"],
  .wow_form_fields input[type="email"],
  .wow_form_fields input[type="tel"],
  .wow_form_fields input[type="number"],
  .wow_form_fields input[type="search"],
  .wow_form_fields input[type="url"],
  .wow_form_fields input[type="date"],
  .wow_form_fields select,
  .wow_form_fields textarea,
  .setting-well input[type="text"],
  .setting-well input[type="password"],
  .setting-well input[type="email"],
  .setting-well input[type="tel"],
  .setting-well input[type="number"],
  .setting-well select,
  .setting-well textarea,
  #search_form input[type="text"],
  #search_form input[type="search"],
  #search_form select,
  #search_form textarea,
  .modal-body form input[type="text"],
  .modal-body form input[type="password"],
  .modal-body form input[type="email"],
  .modal-body form input[type="tel"],
  .modal-body form input[type="number"],
  .modal-body form select,
  .modal-body form textarea {
    font-size: 16px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .login_innre p.title {
    font-size: 24px;
  }
  .wow_form_fields label,
  .setting-well label,
  #search_form label,
  .login_innre label {
    font-size: 15px;
  }
  #search_form .btn.btn-main,
  .setting-well form .btn.btn-main {
    width: 100%;
  }
  #navbar-searchbox .search-input {
    font-size: 16px;
  }
}
