/* =========================================
   signup.css — Estilos específicos para signup.html
   Complementa login.css (layout split base)
   ========================================= */

/* Container mais alto para acomodar o formulário completo */
.signup-container {
    height: auto;
    min-height: 520px;
    max-height: 90vh;
}

/* Left side: imagem embaçada quando há padrinho, nítida quando não há */
.signup-left {
    background-image: none !important;
    filter: none;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
}

/* Aplica blur na imagem de fundo via pseudo-element (mantém conteúdo nítido) */
.signup-left::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('../images/banner-login.jpg');
    background-size: cover;
    background-position: center;
    filter: blur(6px);
    -webkit-filter: blur(6px);
    z-index: 0;
}

/* Sem blur quando não há padrinho */
.signup-left.no-blur::before {
    filter: none;
    -webkit-filter: none;
}

/* Citação Platão — escondida por defeito, visível via JS */
.signup-left .signup-quote {
    display: none !important;
}

.signup-left.has-referrer .signup-quote,
.signup-left.no-blur .signup-quote {
    display: block !important;
    position: absolute;
    bottom: 40px;
    left: 40px;
    right: 40px;
    z-index: 2;
    border-left: 3px solid #FF8400;
    padding-left: 20px;
}

/* Overlay escuro sobre a imagem embaçada */
.signup-left::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

/* --- Referrer overlay (posicionado no topo) --- */
.referrer-overlay {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
    padding: 30px;
    margin-top: 60px;
}

.referrer-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #FF8400;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.referrer-text {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.referrer-text i {
    color: #FF8400;
    margin-right: 4px;
}

.referrer-text strong {
    display: block;
    margin-top: 4px;
    font-size: 1.15rem;
    color: #ffffff;
}

/* Grid 2 colunas para nome/apelido e passwords */
.signup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.signup-grid .input-group {
    margin-bottom: 0;
}

/* --- Mobile Adjustments --- */
@media (max-width: 768px) and (orientation: portrait) {
    .signup-container {
        height: 100vh;
        max-height: none;
    }

    /* Esconder left-side no mobile */
    .signup-left {
        display: none !important;
    }

    .signup-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Esconder citação no mobile — sem ocupar espaço */
    .signup-left.has-referrer .signup-quote,
    .signup-left.no-blur .signup-quote,
    .signup-quote,
    #platoQuote {
        display: none !important;
        position: absolute;
        width: 0;
        height: 0;
        overflow: hidden;
    }

    /* Reduzir espaço entre logo e referrer */
    .logo-box {
        margin-top: -10px;
        margin-bottom: 16px !important;
    }

    /* No mobile, referrerBox no canto superior direito */
    .referrer-overlay {
        flex-direction: row;
        padding: 8px 12px;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        position: absolute;
        top: 12px;
        right: 12px;
        z-index: 10;
        gap: 8px;
    }

    .referrer-avatar-large {
        width: 32px;
        height: 32px;
    }

    .referrer-text {
        color: #ffffff;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
        text-align: right;
        font-size: 0.8rem;
    }

    .referrer-text i {
        display: none;
    }

    .referrer-text strong {
        font-size: 0.85rem;
        color: #ffffff;
    }
}

/* --- Landscape adjustments --- */
@media (max-height: 600px) and (orientation: landscape) {
    .signup-container {
        height: 100vh;
        overflow-y: auto;
    }

    .signup-grid {
        gap: 8px;
    }

    .referrer-avatar-large {
        width: 50px;
        height: 50px;
    }
}

/* --- BARRA DE SEGURANÇA DE PASSWORD --- */
.password-strength-bar {
    display: flex;
    gap: 5px;
    margin-top: 8px;
    margin-bottom: 8px;
}

.strength-block {
    flex: 1;
    height: 5px;
    border-radius: 3px;
    background: #e0e0e0;
    transition: background-color 0.3s ease;
}

.strength-block.active-red {
    background-color: #e74c3c;
}

.strength-block.active-yellow {
    background-color: #f39c12;
}

.strength-block.active-green {
    background-color: #27ae60;
}

/* --- ÍCONE MATCH NO CAMPO CONFIRMAR --- */
.btn-toggle-password.match-ok {
    color: #27ae60 !important;
    pointer-events: none;
}

/* --- TOOLTIP DE REQUISITOS DE PASSWORD --- */
.pass-tooltip-wrapper {
    position: relative;
}

.pass-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #333;
    color: #fff;
    font-size: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    line-height: 1.5;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.pass-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 20px;
    border: 6px solid transparent;
    border-top-color: #333;
}

.pass-tooltip-wrapper:focus-within .pass-tooltip {
    display: block;
}

/* --- CLASSES UTILITÁRIAS (standalone) --- */
.hidden { display: none; }

.signup-msg {
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-size: 13px;
    font-weight: bold;
}

.msg-error {
    background-color: #ffebee;
    border: 1px solid #f5b7b1;
    color: #c0392b;
}

.msg-success {
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
}
