/*
Theme Name: Rota das Letras - Tema Filho
Template: nomedotemaprincipal
Author: Alexandre Modena
Description: Estilos customizados para área Minha Página
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Milonga&display=swap');

/* =====================================================
   CORREÇÃO MINHA PÁGINA - DUPLICAÇÃO E FLORÃO
   ===================================================== */

/* 1. Esconde o "Voltar ao Painel" duplicado que vem do template pai */
.page-template-page-minha-pagina .entry-content > p:first-child:has(a[href*="minha-pagina"]),
body.page-id-XXX .entry-content > p:first-child:has(a[href*="minha-pagina"]) {
    display: none !important;
}

/* 2. Esconde a primeira linha <hr> que vem junto com o link duplicado */
.page-template-page-minha-pagina .entry-content > hr:first-of-type,
body.page-id-XXX .entry-content > hr:first-of-type {
    display: none !important;
}

/* 3. Divisor com florão - impede emoji e aumenta tamanho */
.ld-divisor-florao {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 30px 0 25px 0;
}

.ld-divisor-florao::before,
.ld-divisor-florao::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #eaddca;
}

.ld-divisor-florao span {
    color: #5a3e1b !important;
    font-size: 26px !important;
    padding: 0 18px;
    user-select: none;
    line-height: 1;
    font-family: 'Georgia', 'Times New Roman', serif !important;
}

/* =====================================================
   ESTRUTURA GERAL MINHA PÁGINA / DADOS
   ===================================================== */

/* Wrapper do formulário - referência pro botão Sair */
.ld-formulario-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
}

/* Botão Sair alinhado com Voltar ao Painel */
.ld-link-sair-ancora {
    position: absolute;
    right: 15px;
    top: -64px; 
    color: #5a3e1b;
    text-decoration: none;
    font-family: 'Milonga', cursive;
    font-size: 16px;
    font-weight: normal;
    transition: opacity 0.2s;
    z-index: 999;
    padding: 5px 10px;
}
.ld-link-sair-ancora:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* Container principal do formulário */
.ld-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 50px 45px;
    background: #fdfaf4;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    font-family: 'Georgia', serif;
    border: 1px solid #eaddca;
    border-top: 4px solid #5b3a1d;
    box-sizing: border-box;
}

/* Mensagens de sucesso */
.ld-msg-sucesso {
    background: #e7f3eb; 
    color: #27ae60; 
    padding: 16px; 
    border-radius: 8px; 
    margin-bottom: 25px; 
    text-align: center; 
    font-weight: bold; 
    border-left: 4px solid #27ae60; 
    font-family: 'Milonga', cursive;
}

/* Títulos de seção */
.ld-secao-titulo { 
    font-size: 26px; 
    color: #5a3e1b; 
    margin-bottom: 12px; 
    border-bottom: 1px solid #eaddca; 
    padding-bottom: 12px; 
    font-family: 'Milonga', cursive; 
    letter-spacing: 0.5px;
}

.ld-sub-info { 
    font-size: 14px; 
    color: #8a7a66; 
    margin-bottom: 22px; 
    font-style: italic; 
    display: block; 
    line-height: 1.6;
}

.ld-opcional { 
    font-size: 12px; 
    color: #a08b73; 
    font-weight: normal; 
    margin-left: 8px; 
}

/* Biografia */
.ld-textarea-bio {
    width: 100%; 
    padding: 16px; 
    border: 1px solid #d6c8ae; 
    border-radius: 10px; 
    background: #fffefb; 
    font-family: 'Georgia', serif; 
    font-size: 16px;
    line-height: 1.8; 
    color: #3a2118; 
    resize: vertical; 
    min-height: 220px;
    box-sizing: border-box;
}
.ld-textarea-bio:focus { 
    border-color: #5b3a1d; 
    outline: none; 
}

/* Estilos de escrita - 20 categorias */
.grid-estilos { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); 
    gap: 14px; 
    margin-bottom: 10px;
}

.label-estilo {
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding: 10px 14px; 
    background: #f3ede2; 
    border-radius: 20px; 
    font-size: 15px; 
    cursor: pointer;
    border: 1px solid #e5d8c3; 
    transition: all 0.2s; 
    font-family: 'Georgia', serif;
}
.label-estilo:hover { 
    background: #ebdcb2; 
    border-color: #d4c4a5; 
}
.label-estilo input:checked + span { 
    font-weight: bold; 
    color: #5b3a1d; 
}
.label-estilo input { 
    accent-color: #5b3a1d; 
}

/* Networking - Influência Direta */
.grid-networking {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); 
    gap: 15px;
}

.btn-autor-input {
    background: #5b3a1d; 
    color: #f6e7be; 
    border: 1px solid #4a2f17; 
    padding: 14px; 
    border-radius: 8px; 
    text-align: center; 
    font-family: 'Milonga', cursive; 
    font-size: 14px; 
    width: 100%; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
    transition: all 0.2s;
    box-sizing: border-box;
}
.btn-autor-input:focus {
    background: #fffefb !important; 
    color: #3b2a1a !important;
    border-color: #7a4b21; 
    outline: none; 
    transform: scale(1.03);
}
.btn-autor-input::placeholder { 
    color: rgba(246, 231, 190, 0.4); 
}

/* Campos obrigatórios */
.ld-input-padrao {
    width: 100%; 
    padding: 14px; 
    border: 1px solid #d6c8ae; 
    border-radius: 10px; 
    background: #fffefb; 
    font-family: 'Georgia', serif; 
    font-size: 15px;
    color: #3a2118; 
    box-sizing: border-box;
}
.ld-input-padrao:focus { 
    border-color: #5b3a1d; 
    outline: none; 
}

.btn-add-organico {
    background: none; 
    border: 1px dashed #7a4b21; 
    color: #7a4b21;
    padding: 12px 24px; 
    border-radius: 8px; 
    cursor: pointer; 
    font-weight: bold; 
    margin-top: 18px; 
    font-family: 'Milonga', cursive; 
    transition: all 0.2s;
}
.btn-add-organico:hover { 
    background: #fdf6e9; 
}

/* Botão Salvar */
.ld-btn-salvar {
    background: #5b3a1d; 
    color: #f6e7be; 
    padding: 18px 80px; 
    font-size: 18px; 
    border: none; 
    border-radius: 35px; 
    cursor: pointer; 
    font-weight: bold; 
    box-shadow: 0 5px 15px rgba(91,58,29,0.3); 
    font-family: 'Milonga', cursive;
    transition: all 0.2s;
}
.ld-btn-salvar:hover {
    background: #4a2f17;
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(91,58,29,0.4);
}

/* Responsivo */
@media (max-width: 768px) {
    .ld-container {
        padding: 30px 20px;
        margin: 20px auto;
    }
    .grid-estilos,
    .grid-networking {
        grid-template-columns: 1fr;
    }
    .ld-link-sair-ancora {
        top: -50px;
        right: 10px;
        font-size: 14px;
    }
    .ld-btn-salvar {
        padding: 16px 40px;
        font-size: 16px;
    }
}