/* =======================================================
   LOGIN.CSS — Área pública CTGFácil
   Homenagem ao Mestre Edsson Vasques
======================================================= */

:root {
    --cor-public-primaria:   #B71C1C;
    --cor-public-secundaria: #D32F2F;
    --cor-public-hover:      #9B1717;
    --cor-public-light:      #FFEBEE;
    --cor-public-fundo:      #FAF9F9;
    --cor-public-texto:      #212121;
    --cor-public-branco:     #ffffff;
}

/* -------------------------------------------------------
   Reset mínimo — apenas para área pública
------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body.page-public {
    margin: 0;
    padding: 0;
    font-family: var(--font-principal, 'Arial', sans-serif);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #1a1a1a;
}

/* -------------------------------------------------------
   Header
------------------------------------------------------- */
.page-public__header {
    background-color: var(--cor-public-primaria);
    color: var(--cor-public-branco);
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
	justify-content: center;
    gap: 1rem;
    flex-shrink: 0;
    z-index: 10;
}

.page-public__logo {
    height: 44px;
    width: auto;
}

.page-public__title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
}

.page-public__title span {
    display: block;
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.9;
}

/* -------------------------------------------------------
   Hero — imagem de fundo do Mestre Edsson Vasques
   Ocupa todo o espaço entre header e footer
------------------------------------------------------- */
.page-public__hero {
    flex: 1;
    background-image: url('../../images/default/fundo.jpg');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;   /* ← era center, agora flex-end */
    gap: 20px;                   /* ← gap exato entre glass e botões */
    padding: 2rem 1rem;
    position: relative;
}

/* -------------------------------------------------------
   Painel glassmorphism — saudação central
------------------------------------------------------- */
.page-public__glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 1.75rem 2.5rem;
    text-align: center;
    width: 100%;                 /* ← era max-width: 600px */
    max-width: 900px;            /* ← igual ao max-width dos botões */
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.page-public__glass h2 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cor-public-branco);
    text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
}

.page-public__glass p {
    margin: 0;
    font-size: 1rem;
    color: var(--cor-public-branco);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* -------------------------------------------------------
   Botões de ação — linha horizontal
------------------------------------------------------- */
.page-public__actions {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 860px;
}

.btn-hero {
    background-color: var(--cor-public-primaria);
    color: var(--cor-public-branco);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    padding: 0.75rem 1rem;       /* ← era 1.5rem, reduziu lateral */
    font-size: 0.85rem;          /* ← era 0.95rem, levemente menor */
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    flex: 1;
    transition: background-color 0.2s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.btn-hero:hover {
    background-color: var(--cor-public-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.btn-hero:active {
    transform: translateY(0);
}

/* -------------------------------------------------------
   Footer
------------------------------------------------------- */
.page-public__footer {
    background-color: var(--cor-public-primaria);
    color: var(--cor-public-branco);
    text-align: center;
    padding: 0.65rem;
    font-size: 0.8rem;
    flex-shrink: 0;
    z-index: 10;
}

/* -------------------------------------------------------
   Modal público
------------------------------------------------------- */
.modal-public {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-public.active {
    display: flex;
}

.modal-public__content {
    background: #fff;
    border-radius: 10px;
    border-top: 4px solid var(--cor-public-primaria);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalEntrar 0.22s ease-out;
}

@keyframes modalEntrar {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.modal-public__close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 0;
}

.modal-public__close:hover { color: var(--cor-public-primaria); }

.modal-public__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--cor-public-primaria);
    margin: 0 0 1.25rem;
}

/* -------------------------------------------------------
   Formulários dentro dos modais
------------------------------------------------------- */
.modal-public .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.modal-public .form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--cor-public-texto);
}

.modal-public .form-control {
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.modal-public .form-control:focus {
    outline: none;
    border-color: var(--cor-public-primaria);
    box-shadow: 0 0 0 3px var(--cor-public-light);
}

/* -------------------------------------------------------
   Botões dentro dos modais
------------------------------------------------------- */
.btn-red {
    background-color: var(--cor-public-primaria);
    color: var(--cor-public-branco);
    border: none;
    font-weight: 600;
}

.btn-red:hover { background-color: var(--cor-public-hover); }

.btn-secondary {
    background-color: #6c757d;
    color: var(--cor-public-branco);
    border: none;
}

.btn-secondary:hover { background-color: #5a6268; }

.btn-full { width: 100%; }

.modal-public__content .btn {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    text-align: center;
    margin-bottom: 0.5rem;
    text-decoration: none;
    box-sizing: border-box;
    transition: background-color 0.2s;
}

.modal-public__content .btn:last-child { margin-bottom: 0; }

/* -------------------------------------------------------
   Alertas de erro
------------------------------------------------------- */
.alert-erro {
    background: #FFEBEE;
    border-left: 3px solid var(--cor-public-secundaria);
    color: #7B1818;
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

/* -------------------------------------------------------
   Responsividade
------------------------------------------------------- */
@media (max-width: 600px) {
    .page-public__actions { flex-direction: column; align-items: center; }
    .btn-hero { width: 90%; min-width: unset; }
    .page-public__glass { padding: 1.25rem 1.5rem; }
    .page-public__glass h2 { font-size: 1.2rem; }
}

/* =======================================================
   MOBILE — ≤767px
   Desktop completamente intocado acima desta linha.
   Regra de ouro: nunca remover ou alterar regras acima.
======================================================= */
#mob-login-section { display: none; }   /* oculto no desktop */

@media (max-width: 767px) {

    /* Ocultar elementos exclusivos do desktop */
    .page-public__glass,
    .page-public__actions { display: none !important; }

    /* Hero: remover padding e centralização vertical do desktop */
    .page-public__hero {
        justify-content: flex-start;
        padding: 0;
        position: relative;
    }

    /* Overlay escuro sobre a pintura de Vasques (legibilidade) */
    .page-public__hero::before {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(20, 6, 2, 0.52);
        pointer-events: none;
        z-index: 0;
    }

    /* Wrapper da seção mobile */
    #mob-login-section {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 12px;
        width: 100%;
        box-sizing: border-box;
        position: relative;
        z-index: 1;
    }

    /* ---- Glass card do formulário ---- */
    .mob-card {
        background: rgba(255, 255, 255, 0.09);
        border: 1px solid rgba(255, 255, 255, 0.22);
        border-radius: 14px;
        padding: 16px;
    }

    /* Ícone do sistema */
    .mob-card-icon {
        width: 80px;
        height: 80px;
        margin: 0 auto 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mob-card-icon img {
        width: 80px;
        height: 80px;
        object-fit: contain;
    }

    #mob-icon-fb {
        display: none;
        font-size: 10px;
        font-weight: 700;
        color: #fff;
        width: 100%;
        height: 100%;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .mob-card-title {
        font-size: 13px;
        font-weight: 500;
        color: #fff;
        text-align: center;
        margin: 0 0 14px;
    }

    /* Labels dentro do card */
    .mob-card .form-group label {
        font-size: 11px;
        color: rgba(255, 255, 255, 0.72);
        font-weight: 400;
        margin-bottom: 4px;
    }

    /* Campos de texto */
    .mob-control {
        width: 100%;
        box-sizing: border-box;
        padding: 9px 12px;
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.30);
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
        font-size: 13px;
    }

    .mob-control::placeholder { color: rgba(255, 255, 255, 0.38); }

    .mob-control:focus {
        outline: none;
        border-color: rgba(255, 255, 255, 0.72);
    }

    /* Botão olho (senha) */
    .mob-eye-btn {
        position: absolute;
        right: 8px;
        bottom: 9px;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        color: rgba(255, 255, 255, 0.55);
        font-size: 17px;
        line-height: 1;
        display: flex;
        align-items: center;
    }

    /* Mensagem de erro inline */
    .mob-error {
        background: rgba(183, 28, 28, 0.22);
        border-left: 3px solid #EF5350;
        border-radius: 0 4px 4px 0;
        padding: 7px 10px;
        margin-bottom: 10px;
        font-size: 11px;
        color: #FFCDD2;
    }

    /* Botão Entrar — herda .btn .btn-red .btn-full */
    #mob-btn-entrar { font-size: 13px; margin-bottom: 10px; }

    /* Link fantasma "Esqueci minha senha" */
    .mob-ghost-btn {
        display: block;
        width: 100%;
        text-align: center;
        background: none;
        border: none;
        color: rgba(255, 255, 255, 0.62);
        font-size: 11px;
        cursor: pointer;
        text-decoration: underline;
        text-underline-offset: 3px;
        padding: 0;
    }

    /* ---- Botões secundários ---- */
    .mob-sec-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        box-sizing: border-box;
        padding: 10px 12px;
        background: rgba(0, 0, 0, 0.30);
        border: 1px solid rgba(255, 255, 255, 0.16);
        border-radius: 10px;
        color: rgba(255, 255, 255, 0.80);
        font-size: 11px;
        cursor: pointer;
        text-decoration: none;
    }

    .mob-sec-btn:hover,
    .mob-sec-btn:active { background: rgba(0, 0, 0, 0.48); color: #fff; }

    .mob-sec-btn .ti { font-size: 17px; flex-shrink: 0; }

    .mob-sec-row { display: flex; gap: 8px; }

    .mob-sec-half {
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        font-size: 10px;
        padding: 9px 8px;
        text-align: center;
    }

    .mob-sec-half .ti { margin-bottom: 2px; }

    /* Ajustes finos do header no mobile */
    .page-public__logo { height: 36px; }
    .page-public__title { font-size: 1.1rem; }
}

/* =======================================================
   MELHORIAS TELA INICIAL — botão artista, modal artista,
   ajuda pública e acordeão. (.page-public__hero já é
   position:relative acima — não redefinir.)
======================================================= */

/* ── Botão "Sobre a obra" sobre a imagem hero ── */
.btn-artista-info {
    position: absolute;
    bottom: 1.2rem;
    right: 1.2rem;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 30px;
    padding: .5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: background .2s;
    z-index: 10;
}
.btn-artista-info:hover { background: rgba(0,0,0,0.75); }
.btn-artista-icon { font-size: 1rem; }
.btn-artista-label { font-weight: 500; }

/* ── Modal do artista ── */
.modal-artista-content { max-width: 560px; }
.artista-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}
.artista-header-txt { flex: 1; }
.artista-foto {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 1px 5px rgba(0,0,0,0.25);
}
.artista-icon { font-size: 2.5rem; line-height: 1; }
.artista-bio {
    font-size: .9rem;
    line-height: 1.75;
    color: #444;
    max-height: 60vh;
    overflow-y: auto;
}
.artista-bio strong { color: var(--cor-public-primaria, #8b1a1a); }

/* ── Botão flutuante de ajuda pública ── */
.btn-ajuda-publica {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(139,26,26,0.85);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: background .2s, transform .15s;
}
.btn-ajuda-publica:hover { background: rgba(139,26,26,1); transform: scale(1.08); }

/* ── Acordeão do modal de ajuda ── */
.ajuda-pub-lista {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    max-height: 55vh;
    overflow-y: auto;
}
.ajuda-pub-item {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}
.ajuda-pub-item summary {
    padding: .75rem 1rem;
    cursor: pointer;
    font-weight: 600;
    font-size: .9rem;
    color: #374151;
    background: #f9fafb;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ajuda-pub-item summary::-webkit-details-marker { display: none; }
.ajuda-pub-item summary::after {
    content: '\25B8';
    font-size: .75rem;
    color: var(--cor-public-primaria, #8b1a1a);
    transition: transform .2s;
}
.ajuda-pub-item[open] summary::after { transform: rotate(90deg); }
.ajuda-pub-item > p {
    padding: .75rem 1rem;
    font-size: .875rem;
    color: #555;
    line-height: 1.6;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}
