/* ===========================================
   FORAX APP - Base Styles (base.css)
   Global resets, variables, typography and core components
   =========================================== */

/* FONTS
================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Manrope:wght@200..800&display=swap');

/* VARIABLES
================================================== */
:root {
    --color_background: #F8F7F5;
    --color_text_primary: #262626;
    --color_text_secondary: #636363;
    --color_text_light: #FFFFFF;
    --color_text_light_muted: #E0E0E0;
    --color_border: #E0E0E0;
    
    --color_primary: #4F46E5;
    --color_primary_hover: #382d9d;
    
    --color_secondary: #e16e37;
    --color_secondary_hover: #c25a29;

    --color_success: #16A34A;
    --color_error: #DC2626;
    --color_warning: #D97706;

    --font_heading: 'Manrope', sans-serif;
    --font_body: 'Inter', sans-serif;
}

body.dark-mode {
    --color_background: #1C1917;
    --color_text_primary: #F1F1F1;
    --color_text_secondary: #A8A29E;
    --color_border: #44403C;
}

/* RESET
================================================== */
* {
    font-family: var(--font_body);
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;
    color: #6c757d;
}

body {
    background-color: var(--color_background);
}

img {
    height: auto;
    max-width: 100%;
}

a {
    text-decoration: none;
    transition: all 300ms ease;
}

strong {color: unset;}

ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font_heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--color_text_primary);
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
}

h1 strong, h2 strong {
    color: var(--color_primary);
    font-family: var(--font_heading);
}

h2 {
    font-size: 2.2rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

p, li {
    font-size: 1rem;
    line-height: 1.5rem;
    color: var(--color_text_primary);
}

i {color: unset;}

/* LAYOUT
================================================== */
.container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
}

.flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.py_80 {padding: 80px 0;}
.py_100 {padding: 100px 0;}

.w_49 {width: 49%;}

/* BUTTONS
================================================== */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 5px;
    font-family: var(--font_body);
    font-weight: 600;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: none;
    font-size: 16px;
}

.btn_primary {
    background-color: var(--color_primary);
    color: var(--color_text_light) !important;
}

.btn_primary:hover {
    background-color: var(--color_primary_hover);
}

.btn_secondary {
    background-color: var(--color_secondary);
    color: var(--color_text_light);
}

.btn_secondary:hover {background-color: var(--color_secondary_hover);}

.btn_error:hover,
.btn_success:hover {
    filter: brightness(0.9);
}

.btn_error {
    background-color: var(--color_error);
    color: var(--color_text_light);
}

.btn_success {
    background-color: var(--color_success);
    color: var(--color_text_light);
}

.btn_light {
    background-color: var(--color_background);
    color: var(--color_text_primary);
    border: 1px solid var(--color_border);
}

.btn_light:hover {
    background-color: #F3F4F6;
}

/* HEADER
================================================== */
.forax_header {
    background-color: var(--color_background);
    padding: 20px 0;
}

.header_container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header_logo img {
    height: 50px;
    width: fit-content;
}

.header_nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header_nav a {
    color: var(--color_text_primary);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.header_nav a:hover {
    color: var(--color_primary);
}

.btn_outline {
    padding: 10px 20px;
    border: 1px solid var(--color_primary);
    border-radius: 6px;
    color: var(--color_primary) !important;
    background-color: transparent;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn_outline:hover {
    background-color: var(--color_primary);
    border-color: transparent;
    color: var(--color_text_light) !important;
}


/* DASHBOARD
================================================== */
.forax_dashboard_wrapper {
    display: flex;
    align-items: flex-start; /* Alinha o topo da sidebar com o topo do conteúdo */
    min-height: calc(100vh - 80px); /* Ajuste conforme a altura do seu header/footer */
    padding: 25px; /* Mais padding para um visual mais espaçoso */
    box-sizing: border-box;
    max-width: 1500px; /* Um pouco mais largo para acomodar o grid */
    margin: 0 auto;
}

.forax_sidebar {
    flex: 0 0 280px; /* Largura um pouco maior para a sidebar */
    background-color: var(--color_text_light);
    border-radius: 20px; /* Mais arredondado */
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); /* Sombra mais pronunciada */
    padding: 30px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center; /* Centraliza o conteúdo da sidebar */
    position: -webkit-sticky; /* Para compatibilidade com Safari */
    position: sticky;
    top: 40px; /* Distância do topo onde a sidebar vai "grudar" */
    margin-right: 30px;
}

.sidebar_header {
    text-align: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

.user_avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--color_primary); /* Borda com a cor primária */
}

.user_greeting {
    font-family: var(--font_heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color_text_primary);
    margin-bottom: 5px;
}

.user_tagline {
    font-family: var(--font_body);
    font-size: 0.95em;
    color: var(--color_text_secondary);
}

.sidebar_nav {
    width: 100%; /* Ocupa a largura total da sidebar */
}

.sidebar_nav ul {
    list-style: none;
    padding: 0 20px; /* Padding lateral para os links */
    margin: 0;
}

.sidebar_nav ul li {
    margin-bottom: 10px;
}

.nav_link {
    display: flex; /* Para alinhar ícone e texto */
    align-items: center;
    gap: 15px; /* Espaçamento entre ícone e texto */
    padding: 15px 20px; /* Padding maior para os links */
    color: var(--color_text_primary);
    font-weight: 500;
    text-decoration: none;
    border-radius: 12px; /* Mais arredondado */
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav_link i {
    font-size: 1.2em; /* Tamanho do ícone */
    color: var(--color_text_secondary);
    transition: color 0.2s ease;
}

.nav_link:hover {
    background-color: var(--color_text_light_muted);
    color: var(--color_primary); /* Muda a cor do texto ao hover */
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); /* Sombra ao hover */
}

.nav_link:hover i {
    color: var(--color_primary); /* Muda a cor do ícone ao hover */
}

.nav_link.active {
    background-color: var(--color_primary);
    color: var(--color_text_light);
    box-shadow: 0 5px 20px color-mix(in srgb, var(--color_primary) 30%, transparent); /* Sombra com cor primária */
}

.nav_link.active i {
    color: var(--color_text_light);
}

.sidebar_footer {
    padding: 30px 20px 0;
    border-top: 1px solid var(--color_border);
    margin-top: 30px;
    width: 100%; /* Garante que o footer ocupe a largura da sidebar */
}

.logout_link { /* Reutiliza .btn para o estilo base, e apenas ajusta */
    width: calc(100% - 40px); /* Ajusta a largura para o padding lateral de 20px */
    margin: 0 20px; /* Centraliza o botão */
    background-color: var(--color_error);
    color: var(--color_text_light) !important;
}

.logout_link:hover {
    filter: brightness(0.9);
}

.forax_main_content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 25px; /* Espaçamento maior entre as seções */
    width: 100%;
}


/* INPUTS / FORMS
================================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color_border);
    border-radius: 6px;
    background-color: var(--color_background);
    color: var(--color_text_primary);
    font-family: var(--font_body);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="tel"]::placeholder,
textarea::placeholder {
    color: var(--color_text_secondary);
    opacity: 1;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    border-color: var(--color_primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); /* Suave highlight azul */
}

textarea {
    min-height: 120px;
    resize: vertical;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236B7280'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px 6px;
    padding-right: 36px;
    cursor: pointer;
}

input:disabled,
textarea:disabled,
select:disabled {
    background-color: var(--color_text_light_muted);
    cursor: not-allowed;
    opacity: 0.6;
}

/* LOADING OVERLAY
================================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none; /* Escondido por padrão */
    justify-content: center;
    align-items: center;
    z-index: 99999;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    display: flex;
    opacity: 1;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--color_border);
    border-top-color: var(--color_primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-content h3 {
    font-family: var(--font_heading);
    font-size: 1.5rem;
    color: var(--color_text_primary);
}

.loading-content p {
    font-family: var(--font_body);
    color: var(--color_text_secondary);
    max-width: 350px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* INDEX
================================================== */
#index ul {
    list-style: disc;
    list-style-position: inside;
}

#index h1 {
    margin-bottom: 30px;
}

#index h3 {
    margin: 20px 0;
}

#index p {margin-bottom: 10px;}

#index a {
    color: var(--color_primary);
    text-decoration: underline;
}

#index .atualizacao {
    color: var(--color_text_primary);
    text-decoration: underline;
    margin-bottom: 20px;
    display: block;
}

/* CONTACT FORM 7
================================================== */
.wpcf7-form-control-wrap{position: relative;}
.wpcf7-not-valid-tip{
	display: inline-block;
    position: absolute;
    top: 0;
    right: 0;
    background: var(--color_error);
    color: var(--color_text_light) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    padding: 5px;
    border-radius: 6px;
}

div.wpcf7-response-output{
	width: 100%;
	margin: 5px !important;
    padding: 20px !important;
    border-radius: 10px;
    border: none !important;
    color: var(--color_text_light);
    background:#f5c003;
    display: block;
    text-align: center;
}

form.sent div.wpcf7-response-output{background: var(--color_success) !important}

.wpcf7-spinner {position: absolute;}

/* COOKIES NOTICE
================================================== */
.aceitar_cookies {
    display: none;
}

.aceitar_cookies_container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
    background: var(--color_background);
    padding: 25px 80px;
    box-shadow: 0 24px 81px rgba(0, 0, 0, .4), 0 9px 32px rgba(0, 0, 0, .2) !important;
    position: fixed;
    bottom: 0;
    z-index: 99999999999;
}

.aceitar_cookies p {
    width: calc(100% - 160px);
}

.aceitar_cookies a {
    text-decoration: underline;
    color: var(--color_primary);
}

.aceitar_cookies a:hover {
    color: var(--color_primary_hover);
}

/* RESPONSIVE
================================================== */
@media screen and (max-width: 980px) {
    .w_49 {width: 100%;}
    
    .header_inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .header_nav {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .forax_dashboard_wrapper {
        flex-direction: column;
        padding: 15px;
    }

    #index {
        padding: 40px 0;
    }

    .aceitar_cookies_container {
        flex-direction: column;
        padding: 20px;
    }

    .aceitar_cookies p {
        width: 100%;
        margin-bottom: 20px;
    }
}
