/* Estilos para o cabeçalho padronizado em todo o sistema */
.header-container {
    background-color: #1a1e21;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    padding: 10px 0;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

.header-container .container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-container .d-flex {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Estilo para o container da logo com posição absoluta */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10001;
    pointer-events: auto !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

/* Garante que a logo mantenha posição consistente */
.header-logo {
    height: 55px;
    width: auto;
    display: block;
    max-width: none;
    vertical-align: middle;
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 10000;
}

.header-title {
    color: #ffffff;
    font-weight: 600;
    margin: 0;
    padding: 0;
    text-align: center;
    font-size: 1.5rem;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    line-height: 1;
    vertical-align: middle;
    white-space: nowrap;
    pointer-events: none !important; /* Impede que o título interfira nos cliques da logo */
}

/* Garantir centralização vertical perfeita de todos os elementos do header */
.header-container * {
    vertical-align: middle;
}

.header-container a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.header-container h1 {
    margin: 0;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-container i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
}

/* Centralização específica para textos e elementos de título */
.header-container .header-title,
.header-container h1,
.header-container h2,
.header-container h3,
.header-container h4,
.header-container h5,
.header-container h6 {
    margin: 0;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    height: 100%;
}

/* Garantir que texto dentro do título fique centralizado */
.header-title * {
    margin: 0;
    padding: 0;
    line-height: 1;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Regras específicas para o h1 criado pelo JavaScript */
.header-container h1.header-title {
    color: #ffffff;
    font-weight: 600;
    margin: 0;
    padding: 0;
    text-align: center;
    font-size: 1.5rem;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    line-height: 1;
    vertical-align: middle;
    white-space: nowrap;
}

/* Adiciona padding-top ao corpo para compensar o header fixo */
body {
    padding-top: 90px; /* 70px altura do header + 20px de margin */
}

/* Regra com alta especificidade para garantir centralização em todas as telas */
.header-container .header-title,
.header-container h1.header-title,
.header-container .container .header-title,
.header-container .container h1.header-title {
    color: #ffffff !important;
    font-weight: 600 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    font-size: 1.5rem !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    z-index: 1002 !important;
    pointer-events: none !important; /* Impede que o título interfira nos cliques da logo */
}

/* Regras específicas para formulários ativos - centralização garantida */
body.form-active .header-container,
body:has(#formCard[style*="display: block"]) .header-container,
body:has(#formCard:not([style*="display: none"])) .header-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 70px !important;
    z-index: 1000 !important;
    background-color: #1a1e21 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    padding: 10px 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Logo centralizada verticalmente quando formulário está ativo */
body.form-active .logo-container,
body:has(#formCard[style*="display: block"]) .logo-container,
body:has(#formCard:not([style*="display: none"])) .logo-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 55px !important;
    height: 55px !important;
    position: absolute !important;
    left: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10001 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

/* Logo sempre centralizada quando formulário está ativo */
body.form-active .header-logo,
body:has(#formCard[style*="display: block"]) .header-logo,
body:has(#formCard:not([style*="display: none"])) .header-logo {
    height: 55px !important;
    width: auto !important;
    display: block !important;
    max-width: none !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 10000 !important;
}

/* Título centralizado verticalmente quando formulário está ativo */
body.form-active .header-title,
body.form-active .header-container h1.header-title,
body:has(#formCard[style*="display: block"]) .header-title,
body:has(#formCard[style*="display: block"]) .header-container h1.header-title,
body:has(#formCard:not([style*="display: none"])) .header-title,
body:has(#formCard:not([style*="display: none"])) .header-container h1.header-title {
    color: #ffffff !important;
    font-weight: 600 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: center !important;
    font-size: 1.5rem !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    z-index: 1002 !important;
    pointer-events: none !important; /* Impede que o título interfira nos cliques da logo */
}

/* Container do cabeçalho centralizado quando formulário está ativo */
body.form-active .header-container .container,
body:has(#formCard[style*="display: block"]) .header-container .container,
body:has(#formCard:not([style*="display: none"])) .header-container .container {
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    height: 100% !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* D-flex centralizado quando formulário está ativo */
body.form-active .header-container .d-flex,
body:has(#formCard[style*="display: block"]) .header-container .d-flex,
body:has(#formCard:not([style*="display: none"])) .header-container .d-flex {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

/* Centralização vertical perfeita do rodapé quando formulários estão ativos */
body.form-active .footer,
body:has(#formCard[style*="display: block"]) .footer,
body:has(#formCard:not([style*="display: none"])) .footer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 50px !important;
    background-color: #f8f9fa !important;
    border-top: 1px solid #dee2e6 !important;
    z-index: 9999 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05) !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Container do rodapé centralizado quando formulário ativo */
body.form-active .footer .container,
body:has(#formCard[style*="display: block"]) .footer .container,
body:has(#formCard:not([style*="display: none"])) .footer .container {
    padding: 0 !important;
    height: 100% !important;
    width: 100% !important;
    max-width: 1400px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* D-flex do rodapé centralizado quando formulário ativo */
body.form-active .footer .d-flex,
body:has(#formCard[style*="display: block"]) .footer .d-flex,
body:has(#formCard:not([style*="display: none"])) .footer .d-flex {
    height: 100% !important;
    width: 100% !important;
    align-items: center !important;
    justify-content: space-between !important;
    display: flex !important;
}

/* Desenvolvedor centralizado verticalmente quando formulário ativo */
body.form-active .footer .developer-credit,
body:has(#formCard[style*="display: block"]) .footer .developer-credit,
body:has(#formCard:not([style*="display: none"])) .footer .developer-credit {
    font-size: 0.8rem !important;
    opacity: 0.6 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

/* Empresa centralizada verticalmente quando formulário ativo */
body.form-active .footer span:not(.developer-credit),
body:has(#formCard[style*="display: block"]) .footer span:not(.developer-credit),
body:has(#formCard:not([style*="display: none"])) .footer span:not(.developer-credit) {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle !important;
}

/* Ícones do rodapé centralizados quando formulário ativo */
body.form-active .footer i,
body:has(#formCard[style*="display: block"]) .footer i,
body:has(#formCard:not([style*="display: none"])) .footer i {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    margin-right: 0.25rem !important;
}

/* Strong do desenvolvedor centralizado quando formulário ativo */
body.form-active .footer .developer-credit strong,
body:has(#formCard[style*="display: block"]) .footer .developer-credit strong,
body:has(#formCard:not([style*="display: none"])) .footer .developer-credit strong {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    margin: 0 !important;
    padding: 0 !important;
} 