/*! WhiteLogin — © 2026 José Eugenio Blanco García (White Solutions). Todos los derechos reservados.
 * Software propietario: uso sujeto a licencia (ver LICENCIA.txt). Prohibido copiarlo o distribuirlo. */
/* WhiteLogin 1.3.0 - White Solutions */

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: #f4f6fa;
    color: #1d2533;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wl-root {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ---------- panel de marca ---------- */
.wl-brand {
    position: relative;
    flex: 0 0 42%;
    max-width: 640px;
    color: #fff;
    background-color: var(--wl-color1);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.wl-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(150deg, var(--wl-color1) 0%, var(--wl-color2) 100%);
    opacity: var(--wl-overlay);
}

.wl-brand-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 48px 48px 32px;
}

.wl-logo img {
    display: block;
    max-width: 260px;
    max-height: 120px;
    object-fit: contain;
}

.wl-logo-text {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.wl-tagline {
    margin: 24px 0 0;
    max-width: 380px;
    font-size: 1.15rem;
    line-height: 1.45;
    opacity: 0.9;
}

/* ---------- escaparate: plugins de White Solutions que el cliente no tiene ---------- */
.wl-showcase {
    margin: auto 0;
    padding: 28px 0;
    max-width: 420px;
}

.wl-showcase-title {
    margin-bottom: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    opacity: 0.75;
}

/* todas las tarjetas ocupan la misma celda: el hueco mide lo que la más alta y no hay saltos */
.wl-showcase-cards {
    display: grid;
}

.wl-showcase-card {
    grid-area: 1 / 1;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.45s ease, transform 0.45s ease, visibility 0s linear 0.45s, background-color 0.2s ease;
}

.wl-showcase-card.is-active {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.45s ease, transform 0.45s ease, visibility 0s, background-color 0.2s ease;
}

.wl-showcase-card:hover,
.wl-showcase-card:focus-visible {
    background: rgba(255, 255, 255, 0.17);
    color: #fff;
}

.wl-showcase-card:focus-visible,
.wl-showcase-dot:focus-visible,
.wl-signature:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.wl-showcase-icon {
    flex: 0 0 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 1.25rem;
}

.wl-showcase-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.wl-showcase-name {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.wl-showcase-phrase {
    margin-top: 6px;
    font-size: 0.95rem;
    line-height: 1.4;
    opacity: 0.9;
    overflow-wrap: anywhere;
}

.wl-showcase-cta {
    margin-top: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.wl-showcase-cta i {
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.wl-showcase-card:hover .wl-showcase-cta i {
    transform: translateX(3px);
}

.wl-showcase-dots {
    display: flex;
    gap: 2px;
    margin: 6px 0 0 -3px;
}

/* botón de 24 px para acertar con el dedo; el punto se dibuja dentro */
.wl-showcase-dot {
    position: relative;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.wl-showcase-dot::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 8px;
    width: 8px;
    height: 6px;
    border-radius: 3px;
    background: #fff;
    opacity: 0.4;
    transition: opacity 0.2s ease, width 0.2s ease, left 0.2s ease;
}

.wl-showcase-dot.is-active::before {
    left: 3px;
    width: 18px;
    opacity: 1;
}

/* ---------- pie del panel: texto del cliente + firma de White Solutions ---------- */
.wl-brand-footer {
    margin-top: auto;
    font-size: 0.85rem;
}

.wl-showcase + .wl-brand-footer {
    margin-top: 0;
}

.wl-footer-html {
    opacity: 0.85;
}

.wl-footer-html a {
    color: #fff;
}

.wl-signature {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    color: #fff;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.wl-signature:hover,
.wl-signature:focus-visible {
    color: #fff;
    opacity: 1;
}

.wl-signature img {
    display: block;
    width: auto;
    height: 44px;
}

.wl-signature-by {
    font-size: 0.78rem;
    opacity: 0.8;
}

.wl-signature-web {
    margin-left: auto;
    font-weight: 600;
}

/* pantallas bajas: antes de apretarlo todo, se quita el escaparate */
@media (max-height: 640px) {
    .wl-showcase {
        display: none;
    }

    /* sin el escaparate, el pie vuelve a empujarse él solo hasta abajo */
    .wl-showcase + .wl-brand-footer {
        margin-top: auto;
    }
}

/* ---------- columna del formulario ---------- */
.wl-main {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.wl-card {
    width: 100%;
    max-width: 420px;
}

.wl-title {
    margin: 0 0 4px;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.wl-subtitle {
    margin: 0 0 24px;
    color: #5b6576;
}

.wl-field {
    margin-bottom: 14px;
}

.wl-form .form-label {
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.wl-root .input-group-text,
.wl-modal .input-group-text {
    background: #fff;
    color: #6b7585;
}

.wl-root .form-control,
.wl-modal .form-control {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.wl-root .form-control:focus,
.wl-modal .form-control:focus {
    border-color: var(--wl-color2);
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--wl-color2) 22%, transparent);
}

/* el ojo */
.wl-eye {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-left: 0;
    background: #fff;
    color: #6b7585;
}

.wl-eye:hover,
.wl-eye:focus-visible {
    color: var(--wl-color2);
    background: #f7f9fc;
}

.wl-eye .wl-eye-closed {
    display: none;
}

.wl-eye[aria-pressed="true"] .wl-eye-open {
    display: none;
}

.wl-eye[aria-pressed="true"] .wl-eye-closed {
    display: inline;
}

/* aviso de Bloq Mayús */
.wl-caps {
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    background: #fff4d6;
    color: #7a5300;
    font-size: 0.875rem;
    font-weight: 600;
}

.wl-caps[hidden] {
    display: none;
}

.wl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin: 4px 0 18px;
}

.wl-forgot {
    padding: 0;
    font-size: 0.9rem;
    color: var(--wl-color2);
}

.wl-submit {
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--wl-color2);
    border-color: var(--wl-color2);
}

.wl-submit:hover,
.wl-submit:focus-visible {
    color: #fff;
    background: var(--wl-color1);
    border-color: var(--wl-color1);
}

.wl-submit:disabled {
    color: #fff;
    background: var(--wl-color2);
    opacity: 0.7;
}

.wl-back {
    color: #5b6576;
}

.wl-code {
    font-size: 1.4rem;
    letter-spacing: 0.3em;
    text-align: center;
}

.wl-notice {
    margin-bottom: 20px;
}

.wl-messages .alert {
    margin-bottom: 16px;
}

/* soporte */
.wl-support {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #e3e7ee;
    font-size: 0.9rem;
    color: #5b6576;
}

.wl-support-title {
    margin-bottom: 6px;
    font-weight: 600;
}

.wl-support-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
}

.wl-support-links a {
    color: var(--wl-color2);
    text-decoration: none;
}

.wl-support-links a:hover {
    text-decoration: underline;
}

/* ---------- 1.1: Google, asistencia remota ---------- */
.wl-or {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: #8a93a3;
    font-size: 0.85rem;
}

.wl-or::before,
.wl-or::after {
    content: "";
    flex: 1;
    border-top: 1px solid #e3e7ee;
}

.wl-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0.7rem 1rem;
    font-weight: 600;
    color: #1d2533;
    background: #fff;
    border: 1px solid #dadce0;
}

.wl-google:hover,
.wl-google:focus-visible {
    background: #f7f9fc;
    border-color: #c4c8ce;
    color: #1d2533;
}

.wl-remote {
    margin-top: 12px;
}

.wl-remote-help {
    margin-top: 4px;
    font-size: 0.8rem;
    color: #8a93a3;
}

.wl-tpv .wl-google {
    font-size: 1.25rem;
    padding: 1rem;
}

/* ---------- modo TPV: todo más grande para pantallas táctiles ---------- */
.wl-tpv .wl-card {
    max-width: 520px;
}

.wl-tpv .wl-title {
    font-size: 2.2rem;
}

.wl-tpv .form-control,
.wl-tpv .input-group-text {
    font-size: 1.35rem;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.wl-tpv .wl-eye {
    min-width: 68px;
}

.wl-tpv .wl-eye svg {
    width: 30px;
    height: 30px;
}

.wl-tpv .form-check-input {
    width: 1.6em;
    height: 1.6em;
}

.wl-tpv .form-check-label {
    font-size: 1.15rem;
    padding-left: 6px;
    padding-top: 4px;
}

.wl-tpv .wl-submit {
    font-size: 1.4rem;
    padding: 1.1rem 1rem;
}

/* ---------- móvil y tablet vertical: la marca pasa a cabecera ---------- */
@media (max-width: 767.98px) {
    .wl-root {
        flex-direction: column;
    }

    .wl-brand {
        flex: 0 0 auto;
        max-width: none;
    }

    .wl-brand-inner {
        padding: 22px 20px;
        flex-direction: row;
        align-items: center;
        gap: 14px;
        flex-wrap: wrap;
    }

    .wl-logo img {
        max-width: 180px;
        max-height: 56px;
    }

    .wl-logo-text {
        font-size: 1.4rem;
    }

    .wl-tagline {
        order: 3;
        margin: 0;
        font-size: 0.95rem;
        flex-basis: 100%;
    }

    .wl-showcase,
    .wl-footer-html,
    .wl-signature-by,
    .wl-signature-web {
        display: none;
    }

    /* en el móvil solo los logos: el de White Solutions, pequeño, a la derecha */
    .wl-brand-footer {
        margin: 0 0 0 auto;
    }

    .wl-signature {
        width: auto;
        margin: 0;
        padding: 0;
        border: 0;
    }

    .wl-signature img {
        height: 26px;
    }

    .wl-main {
        align-items: flex-start;
        padding: 24px 16px 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }

    .wl-showcase-card {
        transform: none;
    }
}
