
:root {
    --cf-blue-900: #003366;
    --cf-blue-700: #0055a5;
    --cf-blue-50:  #e6f0fa;
    --cf-bg:       #f6f7fb;
    --cf-card:     #ffffff;
    --cf-ink:      #374151;
    --cf-muted:    #6b7280;
    --cf-line:     #d8deea;
    --cf-error:    #c0392b;
    --cf-error-bg: #fdecea;
}

/* ---------- Página ---------- */
.cf-page {
    min-height: 100vh;
    background-color: var(--cf-bg);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--cf-ink);
}

/* ---------- Hero ---------- */
.cf-hero {
    position: relative;
    background: linear-gradient(135deg, var(--cf-blue-900) 0%, var(--cf-blue-700) 100%);
    color: #fff;
    padding: 15px 16px 52px;
    overflow: hidden;
}
.cf-hero-inner {
    max-width: 720px;
    margin: 0 auto;
}
.cf-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.12);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}
.cf-title {
    font-size: clamp(1.6rem, 4vw, 2.25rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
}
.cf-subtitle {
    font-size: 1rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    max-width: 560px;
}
.cf-hero-wave {
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 56px;
    display: block;
}
.cf-hero-wave path { fill: var(--cf-bg); }

/* ---------- Wrapper ---------- */
.cf-wrapper {
    max-width: 720px;
    margin: 0 auto;
    padding: 36px 16px 64px;
}

/* ---------- Card do formulário ---------- */
.cf-card {
    background-color: var(--cf-card);
    border: 1px solid var(--cf-line);
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(16, 24, 40, 0.06);
    padding: 32px;
}

/* ---------- Campos ---------- */
.cf-field {
    display: block;
    flex-direction: column;
    margin-bottom: 22px;
}
.cf-field:last-of-type { margin-bottom: 0; 
    display: fixed;

}

.cf-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--cf-blue-900);
    margin-bottom: 6px;
}
.cf-req { color: var(--cf-error); }

.cf-input,
.cf-textarea {
    width: 100%;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--cf-ink);
    background-color: #fff;
    border: 1.5px solid var(--cf-line);
    border-radius: 10px;
    padding: 11px 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    box-sizing: border-box;
}
.cf-textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.55;
}
.cf-input::placeholder,
.cf-textarea::placeholder { color: #9ca3af; }

.cf-input:focus,
.cf-textarea:focus {
    outline: none;
    border-color: var(--cf-blue-700);
    box-shadow: 0 0 0 3px rgba(0, 85, 165, 0.15);
}

/* Estado de erro */
.cf-input--error {
    border-color: var(--cf-error);
    background-color: var(--cf-error-bg);
}
.cf-input--error:focus {
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15);
}

.cf-help {
    font-size: 0.8rem;
    color: var(--cf-muted);
    margin: 6px 0 0 0;
}
.cf-error {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--cf-error);
    margin-top: 6px;
}

/* ---------- Linha com dois campos ---------- */
.cf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 22px;
}
.cf-row .cf-field { margin-bottom: 0; }

/* ---------- Ações ---------- */
.cf-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--cf-line);
}
.cf-btn {
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 11px 22px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.cf-btn--primary {
    background-color: var(--cf-blue-700);
    color: #fff;
}
.cf-btn--primary:hover { background-color: var(--cf-blue-900); }
.cf-btn--ghost {
    background-color: transparent;
    color: var(--cf-muted);
    border-color: var(--cf-line);
}
.cf-btn--ghost:hover {
    color: var(--cf-blue-900);
    border-color: var(--cf-blue-700);
}
.cf-btn:focus-visible {
    outline: 2px solid var(--cf-blue-700);
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .cf-wrapper { padding: 28px 16px 56px; }
}

@media (max-width: 640px) {
    .cf-hero { padding: 40px 16px 60px; }
    .cf-card { padding: 22px; border-radius: 14px; }
    .cf-row { grid-template-columns: 1fr; gap: 0; }
    .cf-row .cf-field { margin-bottom: 22px; }
    .cf-actions { flex-direction: column-reverse; align-items: stretch; }
    .cf-btn { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    .cf-input, .cf-textarea, .cf-btn { transition: none; }
}

/* ==========================================================================
   MODAL DE CONFIRMAÇÃO (VINCULAÇÃO DE NOTÍCIA PAI)
   ========================================================================== */

/* Camada de fundo que cobre toda a tela */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.6); /* Fundo escurecido semi-transparente */
    backdrop-filter: blur(4px); /* Leve desfoque no fundo para dar foco ao modal */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999; /* Garante que fique acima de qualquer elemento da página */
    padding: 20px;
}

/* Caixa branca do Modal */
.modal-box {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 28px;
    width: 100%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: cfModalFadeIn 0.25s ease-out;
}

/* Limitador de largura para modais menores (como o de confirmação) */
.modal-box--small {
    max-width: 440px;
}

/* Título do Modal */
.modal-title {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b; /* Cor do texto principal */
}

/* Textos descritivos dentro do modal */
.modal-text {
    margin: 0 0 16px 0;
    font-size: 0.95rem;
    color: #64748b; /* Cor secundária (muted) */
    line-height: 1.5;
}

/* Caixa com o título da notícia selecionada */
.modal-text strong {
    color: #0f172a;
}

/* Customização para botões de ação dentro do modal */
.modal-box .cf-actions {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Ajuste específico para o botão de cancelamento/retorno no modal */
.cf-btn--modal-close {
    background-color: #f1f5f9;
    color: #475569;
}

.cf-btn--modal-close:hover {
    background-color: #e2e8f0;
}

/* Animação suave de surgimento caso o Alpine precise de suporte nativo */
@keyframes cfModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


.cf-error-alert {
    margin-bottom: 1rem;
    padding: 12px 16px;
    border-radius: 8px;
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    transition: opacity .5s ease;
}