/* ── Shared Form Page & Dialog Styles ──────────────────────────────
   Matches the Profile page design language.
   Color palette:
     Primary:  #EE7026   Lighter: #F5832E   Darker: #C05415
     Deep:     #993C1D   Tint:    #FFF0E8   Border: #F0997B
   ─────────────────────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────────── */
/* TERMS & CONDITIONS (shared across Register/Password/T&C dialogs) */
/* ─────────────────────────────────────────────────────────── */
.tnc-scroll {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #F0997B;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--rz-text-color);
    scrollbar-width: thin;
    scrollbar-color: #F0997B transparent;
    margin-bottom: 15px;
}

.tnc-header {
    font-size: 14px;
    color: #993C1D;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #F0997B;
}

.tnc-mission {
    background: #FFF0E8;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 12px;
}

.tnc-mission h2, .tnc-mission h4 {
    margin: 8px 0 4px;
    font-size: 13px;
    color: #C05415;
}

.tnc-mission p {
    margin: 0 0 6px;
    font-size: 12px;
}

.tnc-accept-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #FFF9F6;
    border: 1px solid #F0997B;
    border-radius: 8px;
}

.tnc-accept-label {
    font-size: 13px;
    color: var(--rz-text-color);
}

.tnc-accept-label a {
    color: #EE7026;
    font-weight: 600;
    text-decoration: none;
}

.tnc-accept-label a:hover { text-decoration: underline; }

/* ─────────────────────────────────────────────────────────── */
/* FULL-PAGE FORMS                                             */
/* ─────────────────────────────────────────────────────────── */

.fp-page {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--rz-border-color);
    background: var(--rz-panel-background-color);
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
}

/* ── Orange gradient page header ── */
.fp-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    background: linear-gradient(135deg, #993C1D 0%, #C05415 55%, #EE7026 100%);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.fp-header-shine {
    position: absolute; top: -60%; left: 50%;
    width: 30%; height: 260%;
    background: rgba(255,255,255,0.09);
    transform: rotate(20deg); border-radius: 50%; pointer-events: none;
}

.fp-header-icon {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: white; flex-shrink: 0;
    position: relative; z-index: 1;
}

.fp-header-text {
    display: flex; flex-direction: column; gap: 3px;
    position: relative; z-index: 1; flex: 1; min-width: 0;
}

.fp-header-title { font-size: 17px; font-weight: 700; color: white; line-height: 1.2; }
.fp-header-sub   { font-size: 12px; color: rgba(255,255,255,0.72); }

/* ── Form body (inside the card, below the header) ── */
.fp-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

/* ── Section group dividers ── */
.fp-section {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #EE7026;
    margin: 1.25rem 0 0.75rem;
    padding-bottom: 7px;
    border-bottom: 2px solid #FFF0E8;
}

.fp-section:first-child { margin-top: 0; }
.fp-section i, .fp-section .rzi { font-size: 14px; }

/* ── Individual form fields ── */
.fp-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}

.fp-field > label {
    font-size: 10px;
    font-weight: 700;
    color: #C05415;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
}

/* Orange dot prefix on every label */
.fp-field > label::before {
    content: '';
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #EE7026;
    flex-shrink: 0;
}

/* Make all Radzen inputs full-width inside a field */
.fp-field .rz-textbox,
.fp-field .rz-inputtext,
.fp-field .rz-dropdown,
.fp-field .rz-calendar-input,
.fp-field .rz-textarea,
.fp-field .rz-numeric-input,
.fp-field .rz-password-reveal-toggle + input,
.fp-field .rz-textbox-container { width: 100% !important; }

/* Validation message */
.fp-field .rz-message { font-size: 11px; color: #d32f2f; margin-top: 2px; }

/* ── Multi-column field rows ── */
.fp-row   { display: grid; grid-template-columns: 1fr 1fr;     gap: 14px; }
.fp-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

@media (max-width: 640px) {
    .fp-row, .fp-row-3 { grid-template-columns: 1fr; gap: 0; }
}

/* Red asterisk after the label of a required field */
.fp-required > label::after {
    content: '*';
    color: #d32f2f;
    font-weight: 700;
    margin-left: 2px;
}

/* ── Underline-style tab bar (same idea as the Mi Perfil page's tabs,
   simplified to a flush underline instead of a boxed pill bar - this sits
   directly on the dialog card, which already has its own outer border, so
   a second nested border/background box around the tabs looked like a
   box-inside-a-box and read as broken/unstyled when it rendered) ── */
.fp-tab-bar {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 0 1.5rem;
    /* --rz-border-color is not an actual defined CSS variable anywhere in
       this app (confirmed via computed style - it resolves to nothing, so
       any border using it silently renders as none); using a real color
       instead of repeating that pre-existing dead reference. */
    border-bottom: 1px solid rgba(238, 112, 38, 0.18);
    overflow-x: auto;
    scrollbar-width: none;
}

.fp-tab-bar::-webkit-scrollbar { display: none; }

.fp-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 14px 2px;
    margin-bottom: -1px;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    cursor: pointer;
    color: var(--rz-text-secondary-color);
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}

.fp-tab i, .fp-tab .rzi { font-size: 15px; }

.fp-tab:hover:not(.fp-tab-active) { color: #C05415; }

.fp-tab-active {
    color: #EE7026;
    border-bottom-color: #EE7026;
}

/* ── Error alert at top of form ── */
.fp-alert { margin-bottom: 1.25rem; }

/* ── Action bar (save / cancel) ── */
.fp-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 1rem;
    border-top: 1px solid #FFF0E8;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Orange gradient Save button */
.fp-btn-primary.rz-button,
.fp-btn-primary.rz-button:focus {
    background: linear-gradient(135deg, #F5832E 0%, #EE7026 45%, #C05415 100%) !important;
    border: none !important;
    color: white !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 8px rgba(238,112,38,0.30) !important;
}

.fp-btn-primary.rz-button:hover {
    background: linear-gradient(135deg, #F5832E 0%, #D8601C 45%, #A83D0E 100%) !important;
    box-shadow: 0 3px 12px rgba(238,112,38,0.40) !important;
}

/* Tinted Cancel button */
.fp-btn-secondary.rz-button,
.fp-btn-secondary.rz-button:focus {
    background: #FFF0E8 !important;
    border: 1px solid #F0997B !important;
    color: #993C1D !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
}

.fp-btn-secondary.rz-button:hover {
    background: #FFE4D0 !important;
    border-color: #EE7026 !important;
    color: #C05415 !important;
}

/* ─────────────────────────────────────────────────────────── */
/* DIALOGS                                                     */
/* ─────────────────────────────────────────────────────────── */

.fp-dialog {
    display: flex;
    flex-direction: column;
    min-width: 360px;
    max-width: 560px;
}

/* Orange header bar inside dialog */
.fp-dialog-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #993C1D 0%, #C05415 55%, #EE7026 100%);
    border-radius: 6px 6px 0 0;
    position: relative;
    overflow: hidden;
    margin: -1px -1px 0;
}

.fp-dialog-header-shine {
    position: absolute; top: -50%; left: 50%;
    width: 25%; height: 200%;
    background: rgba(255,255,255,0.09);
    transform: rotate(20deg); border-radius: 50%; pointer-events: none;
}

.fp-dialog-header-icon {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: white; flex-shrink: 0;
    position: relative; z-index: 1;
}

.fp-dialog-header-text {
    display: flex; flex-direction: column; gap: 2px;
    position: relative; z-index: 1; flex: 1; min-width: 0;
}

.fp-dialog-header-title { font-size: 14px; font-weight: 700; color: white; }
.fp-dialog-header-sub   { font-size: 11px; color: rgba(255,255,255,0.72); }

/* Dialog body (padded content below the header) */
.fp-dialog-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    background: var(--rz-panel-background-color);
    border-radius: 0 0 6px 6px;
}

/* Dialog section titles */
.fp-dialog-body .fp-section { margin-top: 0.75rem; }
.fp-dialog-body .fp-section:first-child { margin-top: 0; }

/* Inline hint badges used under form fields */
.fp-hint {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}
.fp-hint-warning { color: #856404; background: #fff3cd; }
.fp-hint-info    { color: #0c5460; background: #d1ecf1; }

/* Inline checkbox row (checkbox + label in a bordered strip) */
.fp-inline-check {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    background: #FFF9F6;
    border: 1px solid #F0997B;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--rz-text-color);
}

/* Error banner for form-level validation messages */
.fp-error {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #842029;
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 7px;
    padding: 9px 12px;
    margin-bottom: 12px;
}

@media (prefers-color-scheme: dark) {
    .fp-inline-check { background: rgba(238,112,38,0.08); border-color: rgba(238,112,38,0.25); }
}
:root[data-theme="dark"] .fp-inline-check { background: rgba(238,112,38,0.08); border-color: rgba(238,112,38,0.25); }
.fp-hint-info.fp-hint-block {
    display: block;
    border: 1px solid #bee5eb;
    padding: 0.5rem;
    margin-top: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

/* "How it works" step list (password reset dialog) */
.fp-howitworks {
    border: 1px solid #f3c8a6;
    background: #FDF0E6;
    color: #333;
    border-radius: 0.25rem;
    padding: 0.625rem 0.75rem;
    margin-top: 0.25rem;
}
.fp-howitworks-title {
    font-weight: 700;
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
    color: #1a1a1a;
}
.fp-howitworks-steps {
    margin: 0;
    padding-left: 1.125rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #333;
}
.fp-howitworks-steps li { margin-bottom: 0.15rem; }
.fp-howitworks-steps li:last-child { margin-bottom: 0; }
/* No dark-mode variant: this dialog (RadzenDialog) always renders on a
   light/white surface regardless of OS theme, so a dark-mode override here
   would mismatch the surrounding card instead of matching it. */

/* Dialog action buttons */
.fp-dialog-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 0.875rem;
    border-top: 1px solid #FFF0E8;
    margin-top: 0.75rem;
}

/* ─────────────────────────────────────────────────────────── */
/* DARK MODE                                                   */
/* ─────────────────────────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
    .fp-section { border-bottom-color: rgba(238,112,38,0.15); }
    .fp-actions  { border-top-color: rgba(238,112,38,0.15); }
    .fp-dialog-actions { border-top-color: rgba(238,112,38,0.15); }
    .fp-dialog-body .fp-section { border-bottom-color: rgba(238,112,38,0.15); }
    .fp-btn-secondary.rz-button { background: rgba(255,240,232,0.12) !important; color: #F0997B !important; border-color: rgba(240,153,123,0.4) !important; }
    .fp-field > label { color: #F0997B; }
}

:root[data-theme="dark"] {
    .fp-section { border-bottom-color: rgba(238,112,38,0.15); }
    .fp-actions  { border-top-color: rgba(238,112,38,0.15); }
    .fp-dialog-actions { border-top-color: rgba(238,112,38,0.15); }
    .fp-btn-secondary.rz-button { background: rgba(255,240,232,0.12) !important; color: #F0997B !important; border-color: rgba(240,153,123,0.4) !important; }
    .fp-field > label { color: #F0997B; }
}

:root[data-theme="light"] {
    .fp-section { border-bottom-color: #FFF0E8; }
    .fp-actions  { border-top-color: #FFF0E8; }
    .fp-dialog-actions { border-top-color: #FFF0E8; }
    .fp-btn-secondary.rz-button { background: #FFF0E8 !important; color: #993C1D !important; border-color: #F0997B !important; }
}
