﻿/* wwwroot/css/formulario-interes.css */

/* ============ DARK THEME (default) ============ */
:root,
[data-theme="dark"] {
    --navy: #0b1736;
    --navy2: #0a2148;
    --gold: #f6c500;
    --ink: #0f172a;
    --bg-gradient: radial-gradient(900px 600px at 20% 20%, rgba(246,197,0,.16), transparent 60%), radial-gradient(900px 600px at 80% 30%, rgba(80,140,255,.14), transparent 55%), linear-gradient(135deg, #0b1736, #0a2148);
    --text-color: #ffffff;
    --text-muted: rgba(255,255,255,.85);
    --card-bg: rgba(255,255,255,.10);
    --card-border: rgba(255,255,255,.16);
    --label-color: rgba(255,255,255,.92);
    --input-bg: rgba(255,255,255,.92);
    --input-border: rgba(15,23,42,.12);
    --input-text: #0f172a;
    --section-bg: rgba(255,255,255,.06);
    --section-border: rgba(255,255,255,.14);
    --vignette: radial-gradient(1200px 800px at 50% 40%, rgba(0,0,0,.10), rgba(0,0,0,.55));
    --error-color: #ff6b6b;
    --error-bg: rgba(255,107,107,.12);
    --error-border: rgba(255,107,107,.40);
}

/* ============ LIGHT THEME ============ */
[data-theme="light"] {
    --navy: #f4f6fb;
    --navy2: #e6ecf5;
    --gold: #c9a300;
    --ink: #0f172a;
    --bg-gradient: radial-gradient(900px 600px at 20% 20%, rgba(201,163,0,.10), transparent 60%), radial-gradient(900px 600px at 80% 30%, rgba(80,140,255,.08), transparent 55%), linear-gradient(135deg, #f4f6fb, #e6ecf5);
    --text-color: #0f172a;
    --text-muted: rgba(15,23,42,.75);
    --card-bg: rgba(255,255,255,.85);
    --card-border: rgba(15,23,42,.10);
    --label-color: rgba(15,23,42,.92);
    --input-bg: #ffffff;
    --input-border: rgba(15,23,42,.18);
    --input-text: #0f172a;
    --section-bg: rgba(15,23,42,.04);
    --section-border: rgba(15,23,42,.10);
    --vignette: radial-gradient(1200px 800px at 50% 40%, rgba(255,255,255,.20), rgba(15,23,42,.10));
    --error-color: #d32f2f;
    --error-bg: rgba(211,47,47,.08);
    --error-border: rgba(211,47,47,.35);
}

/* ============ BASE ============ */
html, body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background: var(--bg-gradient) !important;
    color: var(--text-color) !important;
    overflow-x: hidden;
    transition: background .3s ease, color .3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.bg-vignette {
    position: fixed;
    inset: 0;
    background: var(--vignette);
    z-index: -1;
    pointer-events: none;
}

/* ============ TOPBAR / THEME TOGGLE ============ */
.topbar {
    width: 100%;
    padding: 18px 18px 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 10;
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-color);
    cursor: pointer;
    transition: all .2s ease;
}

    .theme-toggle:hover {
        background: rgba(246,197,0,.20);
        border-color: var(--gold);
    }

    .theme-toggle svg {
        width: 20px;
        height: 20px;
    }

/* ============ LAYOUT ============ */
.wrap {
    min-height: calc(100vh - 62px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 14px 40px;
}

.shell {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
}

/* ============ BRAND / LOGOS ============ */
.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    margin-bottom: 22px;
}

.logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.logo-ppr {
    height: 92px !important;
    width: auto !important;
    max-width: 80px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
}

.logo-reclutamiento {
    height: 92px !important;
    width: 92px !important;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    padding: 4px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.25));
}

.title {
    font-weight: 900;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin: 0;
    letter-spacing: .2px;
    color: var(--text-color);
}

.subtitle {
    margin: 0;
    color: var(--text-muted);
    /*max-width: 70ch;*/
    line-height: 1.45;
}

/* ============ CARD ============ */
.cardx {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 22px;
    box-shadow: 0 22px 60px rgba(0,0,0,.28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
}

.cardx-body {
    padding: 22px 24px 24px;
}

/* ============ SECTION (ESTADÍSTICAS) ============ */
.section-block {
    background: var(--section-bg);
    border: 1px solid var(--section-border);
    border-radius: 14px;
    padding: 16px 18px;
    margin-top: 22px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.badge-stat {
    background: var(--gold);
    color: #09122a;
    font-weight: 900;
    font-size: .75rem;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: .3px;
    display: inline-block;
}

.section-title {
    font-weight: 900;
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-color);
}

.section-help {
    color: var(--text-muted);
    font-size: .85rem;
    margin: 4px 0 14px;
}

/* ============ FORM ============ */
.form-label {
    font-weight: 800;
    color: var(--label-color) !important;
    margin-bottom: 6px;
}

    .form-label .req {
        color: var(--error-color);
        margin-left: 2px;
        font-weight: 900;
    }

.form-control,
.form-select {
    background: var(--input-bg) !important;
    border: 1px solid var(--input-border) !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    color: var(--input-text) !important;
}

    .form-control:focus,
    .form-select:focus {
        border-color: rgba(246,197,0,.60) !important;
        box-shadow: 0 0 0 .25rem rgba(246,197,0,.22) !important;
        background: var(--input-bg) !important;
        color: var(--input-text) !important;
    }

    .form-control::placeholder {
        color: rgba(15,23,42,.45);
    }

.form-check-input {
    width: 1.15em;
    height: 1.15em;
    margin-top: .2em;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
}

    .form-check-input:checked {
        background-color: var(--gold) !important;
        border-color: var(--gold) !important;
    }

    .form-check-input:focus {
        border-color: rgba(246,197,0,.60);
        box-shadow: 0 0 0 .25rem rgba(246,197,0,.22);
    }

.form-check-label {
    color: var(--label-color) !important;
    font-weight: 700;
}

/* ============ VALIDATION ERRORS ============ */
/* jQuery Validation usa estas clases */
.field-validation-error,
.field-error,
span.field-validation-error {
    color: var(--error-color) !important;
    font-size: .85rem !important;
    font-weight: 700 !important;
    margin-top: 4px !important;
    display: block !important;
}

.input-validation-error {
    border-color: var(--error-color) !important;
    box-shadow: 0 0 0 .15rem var(--error-bg) !important;
}

.validation-summary-errors {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-color) !important;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-weight: 700;
}

    .validation-summary-errors ul {
        margin: 0;
        padding-left: 18px;
    }

.validation-summary-valid {
    display: none;
}

/* ============ BUTTONS ============ */
.btn-gold,
.btn-gold:link,
.btn-gold:visited {
    background: var(--gold) !important;
    border-color: var(--gold) !important;
    color: #09122a !important;
    font-weight: 900;
    letter-spacing: .3px;
    border-radius: 12px !important;
    padding: 12px 22px !important;
}

    .btn-gold:hover,
    .btn-gold:focus,
    .btn-gold:focus-visible,
    .btn-gold:active {
        background: var(--gold) !important;
        border-color: var(--gold) !important;
        color: #09122a !important;
        filter: brightness(.95);
        box-shadow: 0 0 0 .25rem rgba(246,197,0,.22) !important;
    }

.btn-ghost {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    color: var(--text-color) !important;
    font-weight: 900;
    border-radius: 12px !important;
    padding: 12px 22px !important;
}

    .btn-ghost:hover {
        background: rgba(246,197,0,.10) !important;
        color: var(--text-color) !important;
        border-color: var(--gold) !important;
    }

/* ============ FOOTER ============ */
.legal {
    text-align: center;
    margin-top: 16px;
    color: var(--text-muted);
    font-size: .9rem;
}

/* ============ INACTIVE / CONFIRMATION ============ */
.alert-inactive {
    background: rgba(246,197,0,.12);
    border: 1px solid rgba(246,197,0,.35);
    color: var(--text-color);
    padding: 24px;
    border-radius: 16px;
    text-align: center;
}

    .alert-inactive svg {
        width: 64px;
        height: 64px;
        color: var(--gold);
        margin-bottom: 12px;
    }

.confirm-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: rgba(46,229,157,.18);
    border: 2px solid #2ee59d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

    .confirm-icon svg {
        width: 52px;
        height: 52px;
        color: #2ee59d;
    }

/* ============ RESPONSIVE ============ */
@media (max-width: 575.98px) {
    .logo-ppr {
        height: 70px !important;
        max-width: 62px;
    }

    .logo-reclutamiento {
        height: 70px !important;
        width: 70px !important;
    }

    .cardx-body {
        padding: 18px;
    }

    .logo-row {
        gap: 12px;
    }
}

/* ============ POLICE OFFICER SILHOUETTE ============ */
.officer-silhouette {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translate(-100%, -50%);
    height: 85vh;
    width: auto;
    max-width: 45vw;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,.35));
    animation: officer-enter 2.4s cubic-bezier(.22, 1, .36, 1) .3s forwards;
}

@keyframes officer-enter {
    0% {
        transform: translate(-100%, -50%);
        opacity: 0;
    }

    60% {
        opacity: .32;
    }

    100% {
        transform: translate(-5%, -50%);
        opacity: .38;
    }
}

/* En light theme la silueta debe verse menos para no competir */
[data-theme="light"] .officer-silhouette {
    animation-name: officer-enter-light;
}

@keyframes officer-enter-light {
    0% {
        transform: translate(-100%, -50%);
        opacity: 0;
    }

    60% {
        opacity: .12;
    }

    100% {
        transform: translate(-5%, -50%);
        opacity: .15;
    }
}

/* Ocultar en pantallas pequeñas para no estorbar el formulario */
@media (max-width: 991.98px) {
    .officer-silhouette {
        display: none;
    }
}

/* Respetar preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .officer-silhouette {
        animation: none;
        transform: translate(-5%, -50%);
        opacity: .32;
    }
}

/* ============ FEMALE POLICE OFFICER SILHOUETTE (right side) ============ */
.officer-silhouette-right {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translate(100%, -50%);
    height: 85vh;
    width: auto;
    max-width: 45vw;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,.35));
    animation: officer-enter-right 2.4s cubic-bezier(.22, 1, .36, 1) .3s forwards;
}

@keyframes officer-enter-right {
    0% {
        transform: translate(100%, -50%);
        opacity: 0;
    }

    60% {
        opacity: .32;
    }

    100% {
        transform: translate(-10%, -50%);
        opacity: .38;
    }
}

/* En light theme la silueta debe verse menos para no competir */
[data-theme="light"] .officer-silhouette-right {
    animation-name: officer-enter-right-light;
}

@keyframes officer-enter-right-light {
    0% {
        transform: translate(100%, -50%);
        opacity: 0;
    }

    60% {
        opacity: .12;
    }

    100% {
        transform: translate(-10%, -50%);
        opacity: .15;
    }
}

/* Ocultar en pantallas pequeñas para no estorbar el formulario */
@media (max-width: 991.98px) {
    .officer-silhouette-right {
        display: none;
    }
}

/* Respetar preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .officer-silhouette-right {
        animation: none;
        transform: translate(-5%, -50%);
        opacity: .32;
    }
}

/* Invertir silueta en dark theme para que se vea clara */
[data-theme="dark"] .officer-silhouette,
[data-theme="dark"] .officer-silhouette-right {
    filter: invert(1) brightness(0.3) drop-shadow(0 8px 24px rgba(0,0,0,.35));
}