/**
 * @fileoverview Stylesheet for the Login & Register page.
 * @file login.css
 * @project Chicky Gallery
 * @author Juan M
 */


/* =============================================
   ESTADOS DEL FORMULARIO
============================================= */

.hidden {
    display: none !important;
}

.error-message {
    margin: 0 0 20px;
    padding: 13px 15px;

    background: rgba(231, 76, 60, 0.08);
    color: #c0392b;

    border: 1px solid rgba(231, 76, 60, 0.20);
    border-left: 4px solid #e74c3c;

    border-radius: 9px;

    font-size: 0.88rem;
    line-height: 1.5;

    box-sizing: border-box;
}

.success-message {
    margin: 0 0 20px;
    padding: 13px 15px;

    background: rgba(39, 138, 75, 0.08);
    color: #278a4b;

    border: 1px solid rgba(39, 138, 75, 0.20);
    border-left: 4px solid #278a4b;

    border-radius: 9px;

    font-size: 0.88rem;
    line-height: 1.5;

    box-sizing: border-box;
}


/* =============================================
   PÁGINA
============================================= */

.login-page-container {
    width: 100%;
    min-height: calc(100vh - 180px);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 50px 20px;

    box-sizing: border-box;
}


/* =============================================
   TARJETA PRINCIPAL
============================================= */

.form-card {
    width: min(100%, 470px);

    padding: 38px 42px;

    background: var(--bg-panel, #ffffff);

    border: 1px solid var(--border, #e2dce8);
    border-radius: 20px;

    box-shadow:
        0 12px 35px rgba(175, 0, 161, 0.10);

    box-sizing: border-box;

    transition:
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.form-card:hover {
    box-shadow:
        0 16px 40px rgba(175, 0, 161, 0.14);
}


/* =============================================
   BRANDING
============================================= */

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 13px;

    margin-bottom: 34px;
}

.login-logo {
    width: 52px;
    height: 52px;

    object-fit: contain;

    border-radius: 13px;

    flex: 0 0 52px;
}

.login-brand-text {
    display: flex;
    flex-direction: column;

    gap: 2px;
}

.login-brand-text strong {
    color: var(--primary-color, #af00a1);

    font-family: "Montserrat", "Segoe UI", Roboto, Arial, sans-serif;

    font-size: 1.15rem;
    font-weight: 800;

    letter-spacing: 0.2px;
}

.login-brand-text span {
    color: var(--text-muted, #6f6f7a);

    font-size: 0.78rem;
}


/* =============================================
   ENCABEZADO DEL FORMULARIO
============================================= */

.form-header {
    margin-bottom: 28px;

    text-align: center;
}

.form-header h2 {
    margin: 0 0 8px;

    color: var(--text-main, #2d2d35);

    font-family: "Montserrat", "Segoe UI", Roboto, Arial, sans-serif;

    font-size: 1.65rem;
    font-weight: 700;

    line-height: 1.25;
}

.form-description {
    margin: 0;

    color: var(--text-muted, #6f6f7a);

    font-size: 0.9rem;
    line-height: 1.5;
}


/* =============================================
   FORMULARIO
============================================= */

#login-form,
#register-form {
    width: 100%;
}


/* =============================================
   CAMPOS
============================================= */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;

    margin: 0 0 7px;

    color: var(--text-main, #2d2d35);

    font-size: 0.88rem;
    font-weight: 700;
}

.form-group input {
    width: 100%;
    min-height: 48px;

    padding: 12px 14px;

    background: var(--bg-input, #ffffff);
    color: var(--text-main, #2d2d35);

    border: 1px solid var(--border, #e2dce8);
    border-radius: 10px;

    font-family: inherit;
    font-size: 0.95rem;

    box-sizing: border-box;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.form-group input::placeholder {
    color: #9a8fa1;
}

.form-group input:hover {
    border-color: #cdbfd2;
}

.form-group input:focus {
    outline: none;

    border-color: var(--primary-color, #af00a1);

    box-shadow:
        0 0 0 3px rgba(175, 0, 161, 0.12);
}


/* =============================================
   BOTÓN PRINCIPAL
============================================= */

.btn-submit {
    width: 100%;
    min-height: 50px;

    margin-top: 4px;

    padding: 13px 18px;

    background: var(--primary-color, #af00a1);
    color: #ffffff;

    border: none;
    border-radius: 10px;

    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;

    cursor: pointer;

    box-sizing: border-box;

    transition:
        background-color 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;
}

.btn-submit:hover {
    background: var(--primary-hover-color, #d642df);

    transform: translateY(-1px);

    box-shadow:
        0 6px 16px rgba(175, 0, 161, 0.20);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:focus-visible {
    outline: 2px solid var(--primary-color, #af00a1);
    outline-offset: 3px;
}


/* =============================================
   CAMBIO LOGIN / REGISTRO
============================================= */

.form-switch {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    gap: 5px;

    margin-top: 24px;

    color: var(--text-muted, #6f6f7a);

    font-size: 0.88rem;
    text-align: center;
}

.form-switch span {
    color: var(--text-muted, #6f6f7a);
}

.form-switch a {
    color: var(--primary-color, #af00a1);

    font-weight: 700;

    text-decoration: none;

    transition: color 0.2s ease;
}

.form-switch a:hover {
    color: var(--primary-hover-color, #d642df);
    text-decoration: underline;
}


/* =============================================
   BOTÓN REGRESAR
============================================= */

.btn-back {
    display: block;

    width: fit-content;

    margin: 18px auto 0;
    padding: 7px 12px;

    color: var(--text-muted, #6f6f7a);

    font-size: 0.85rem;
    font-weight: 600;

    text-decoration: none;

    border-radius: 7px;

    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.btn-back:hover {
    color: var(--primary-color, #af00a1);

    background: var(--bg-panel-soft, #f5edf7);

    text-decoration: none;
}


/* =============================================
   RESPONSIVE
============================================= */

@media (max-width: 600px) {

    .login-page-container {
        min-height: auto;

        padding: 30px 14px;
    }

    .form-card {
        padding: 30px 24px;

        border-radius: 17px;
    }

    .login-brand {
        margin-bottom: 28px;
    }

    .login-logo {
        width: 46px;
        height: 46px;

        flex-basis: 46px;
    }

    .login-brand-text strong {
        font-size: 1.05rem;
    }

    .form-header {
        margin-bottom: 24px;
    }

    .form-header h2 {
        font-size: 1.45rem;
    }

    .form-group {
        margin-bottom: 18px;
    }
}


@media (max-width: 400px) {

    .login-page-container {
        padding: 20px 10px;
    }

    .form-card {
        padding: 26px 18px;

        border-radius: 15px;
    }

    .login-brand {
        margin-bottom: 24px;
    }

    .login-brand-text span {
        display: none;
    }

    .form-header h2 {
        font-size: 1.35rem;
    }
}


/* =============================================
   DARK MODE
============================================= */

body.dark-mode .form-card {
    background: var(--bg-panel);
    border-color: var(--border);

    box-shadow:
        0 14px 35px rgba(0, 0, 0, 0.35);
}

body.dark-mode .form-card:hover {
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.45);
}

body.dark-mode .form-group input {
    background: var(--bg-input);
    color: var(--text-main);
}

body.dark-mode .form-group input:hover {
    border-color: #55445f;
}

body.dark-mode .form-group input::placeholder {
    color: #857a8b;
}

body.dark-mode .error-message {
    background: rgba(231, 76, 60, 0.12);
    color: #ff8d84;
}

body.dark-mode .success-message {
    background: rgba(39, 138, 75, 0.12);
    color: #6fd499;
}

/* =============================================
   REENVIAR CONFIRMACIÓN
============================================= */

.resend-confirmation-container {
    margin-top: 20px;
    padding: 15px;

    text-align: center;

    background: rgba(175, 0, 161, 0.05);

    border: 1px solid rgba(175, 0, 161, 0.14);
    border-radius: 10px;
}

.resend-confirmation-container p {
    margin: 0 0 10px;

    color: var(--text-muted, #6f6f7a);

    font-size: 0.84rem;
}

.btn-resend-confirmation {
    padding: 9px 14px;

    background: transparent;
    color: var(--primary-color, #af00a1);

    border: 1px solid var(--primary-color, #af00a1);
    border-radius: 8px;

    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 700;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.15s ease;
}

.btn-resend-confirmation:hover {
    background: var(--primary-color, #af00a1);
    color: #ffffff;

    transform: translateY(-1px);
}

.btn-resend-confirmation:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.resend-confirmation-message {
    margin-top: 10px;

    color: var(--text-muted, #6f6f7a);

    font-size: 0.82rem;
    line-height: 1.4;
}

.resend-confirmation-message.success {
    color: #278a4b;
}

.resend-confirmation-message.error {
    color: #c0392b;
}

body.dark-mode .resend-confirmation-container {
    background: rgba(175, 0, 161, 0.10);
    border-color: rgba(175, 0, 161, 0.20);
}