/*-------------------------------------------
  1) RESET & BASE
-------------------------------------------*/
html, body {
    margin: 0;
    padding: 0;
}
*, *::before, *::after {
    box-sizing: border-box;
}

/*-------------------------------------------
  2) BODY
-------------------------------------------*/
body {
    font-family: 'Roboto', Arial, sans-serif;
    color: #3e404a;
    background: url('/assets/img/fundoazulescuro2.png') no-repeat center center fixed;
    background-size: cover;
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    padding-top: 56px;
    padding: 20px;
    min-height: 100vh;
    font-size: 12px;
    line-height: 1.2;
    transition: background-color 0.3s, color 0.3s;
}

/*-------------------------------------------
  3) VARIÁVEIS DE TEMA
-------------------------------------------*/
:root {
    --form-border-default: #ddd;
    --form-border-active: var(--primary-color);
    --form-border-radius: 4px;
}

/*-------------------------------------------
  4) BOTÕES GERAIS
-------------------------------------------*/
.btn {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/*-------------------------------------------
  5) NAVBAR
-------------------------------------------*/
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1050;
}
.navbar .container-fluid {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
}
.navbar-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}
.navbar-logo img {
    max-height: 40px;
}
.navbar-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
}
.navbar-progress-container .progress {
    height: 6px;
    margin: 0;
    background-color: transparent;
    border-radius: 0;
}
.navbar-progress-container .progress-bar {
    background-color: #007bff;
    border-radius: 0;
}

/*-------------------------------------------
  6) SIDEBAR
-------------------------------------------*/
.sidebar {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    width: 16.8rem;
    background-color: #050251;
    padding: 1.25rem;
    overflow-y: auto;
}
.sidebar img,
.sidebar button,
.sidebar a.btn {
    width: 14.8rem;
    max-width: 100%;
}
.sidebar .menu-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0;
}
.sidebar .menu-list li {
    margin-bottom: 0.625rem;
}
.sidebar .menu-list li a {
    text-decoration: none;
    font-weight: bold;
}
.list-group-item-step {
    background-color: #2e75c6;
    color: #fff;
    font-weight: normal;
    border: none;
    text-align: center;
    cursor: default;
    position: relative;
    padding: 0.25rem 1rem;
    margin-bottom: 0.2rem;
    border-radius: 0.125rem;
}
.list-group-item-step.active {
    background-color: green !important;
    color: white !important;
    font-weight: bold;
}
.list-group-item-step.active::after {
    content: "✔";
    font-size: 0.8rem;
    font-weight: bold;
    position: absolute;
    right: 0.9375rem;
    color: white;
}
.logo-sidebar {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 50%;
    margin: 0 auto;
}

/*-------------------------------------------
  7) MAIN CONTENT
-------------------------------------------*/
.main-content {
    margin-left: 12.8rem;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/*-------------------------------------------
  8) FORM CONTAINER
-------------------------------------------*/
.form-container {
    background: #fff;
    border: 1px solid var(--form-border-default);
    border-radius: var(--form-border-radius);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 0 60px;
    overflow: visible;
    transition: border-color .3s ease, box-shadow .3s ease;
}
.form-container.active,
.form-container:focus-within {
    border: 2px solid var(--form-border-active);
    box-shadow: 0 2px 6px rgba(0,123,255,0.2);
    border-left: 4px solid var(--form-border-active);
}

/*-------------------------------------------
  9) FORM HEADER & FOOTER
-------------------------------------------*/
.form-header {
    background: #f2f2f2;
    padding: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    position: relative;
    width: 100%;
    margin: 0 0 10px;
    border-bottom: 1px solid #cad3d0;
}
.form-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--form-footer-bg);
    padding: 0.5rem;
    border-top: 1px solid #cad3d0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
}
.form-footer .btn {
    min-width: 120px;
    height: 45px;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    margin-right: 10px;
    gap: 10px;
}

/*-------------------------------------------
 10) FORM CONTENT & ELEMENTS
-------------------------------------------*/
.form-main {
    padding: 1rem;
}
.form-contains input,
.form-contains select,
.form-contains textarea {
    width: 100%;
    padding: 0.3rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 0.75rem;
}
.form-contains textarea {
    resize: none;
}
.textarea-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
}
.textarea-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('img/FCPMarcaDagua.png') center/contain no-repeat;
    opacity: 0.8;
    pointer-events: none;
    z-index: 1;
}
.form-textarea {
    position: relative;
    background: transparent;
    z-index: 2;
}
.form-label {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}
.form-control {
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
}

/*-------------------------------------------
 11) RADIO BUTTONS ESTÉTICA (QUADRADOS)
-------------------------------------------*/
.form-contains label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 0.5rem;
}
.form-contains input[type="radio"] {
    /* Tornar quadrado básico */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid #007bff;
    border-radius: 0.25rem;
    position: relative;
    margin: 0;
}
.form-contains input[type="radio"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: #007bff;
    transition: width 0.1s ease, height 0.1s ease;
    border-radius: 0.1rem;
}
.form-contains input[type="radio"]:checked::before {
    width: 0.5rem;
    height: 0.5rem;
}


/*-------------------------------------------
 11) PROGRESS BARS
-------------------------------------------*/
/* ===========================================================
   Estilos de layout e componentes gerais
   =========================================================== */

/* Container da barra de progresso dentro do navbar */
.navbar-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1030; /* acima do conteúdo do navbar */
}

/* Container da barra de progresso (estrutura Bootstrap) */
#progress-bar-container {
    margin: 0;
    height: 4px; /* altura fina para o indicador */
}

/* Barra interna de progresso */
#progress-bar {
    transition: width 0.4s ease; /* animação suave */
}

/*-------------------------------------------
 12) NAVIGATION BUTTONS
-------------------------------------------*/
.btnanterior, .btn-prev,
.btnproximo, .btn-next {
    font-weight: bold;
    color: #fff;
    border: 3px solid #fff;
    text-shadow: 0 -1px 1px #222;
    box-shadow: 2px 2px 5px #000;
    border-radius: 7px;
    padding: 6px 10px;
    cursor: pointer;
    gap: 10px;
}
.btnanterior, .btn-prev {
    font: bold 16px 'Roboto', Geneva, sans-serif;
    background-color: var(--btn-back, #1568db);
}
.btnproximo, .btn-next {
    font: bold 16px Tahoma, Geneva, sans-serif;
    background-color: var(--btn-next, #0f8535);
    width: 129px;
    position: relative;
}

/*-------------------------------------------
 13) TITLES & ADDITIONAL STYLES
-------------------------------------------*/
.h3-forms {
    text-align: center;
    color: #1A73E8;
    font-size: 1.1rem;
}
.h4-forms {
    text-align: center;
    color: #0240b3;
    font-size: 1.4rem;
}
.negrito-italico {
    font-weight: bold;
    font-style: italic;
}
.form-header, .form-content,
.row {
    margin-bottom: 5px;
}

/*-------------------------------------------
 14) RESPONSIVIDADE
-------------------------------------------*/
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
    }
    .main-content {
        margin-left: 0;
    }
    .form-header {
        width: 100%;
    }
    .row.select-line {
        flex-direction: column;
    }
}

/*-------------------------------------------
 14.1) TABLETS (769px ↔ 1024px)
-------------------------------------------*/
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 25%; /* reduz um pouco pra caber lado a lado */
        position: relative;
    }
    .main-content {
        margin-left: 25%;
        padding: 0 20px;
    }
    .form-header {
        width: auto;
        padding: 10px 0;
    }
    .row.select-line {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/*-------------------------------------------
 14.2) NOTEBOOKS PEQUENOS (1025px ↔ 1366px)
-------------------------------------------*/
@media (min-width: 1025px) and (max-width: 1366px) {
    .sidebar {
        width: 20%;
        position: relative;
    }
    .main-content {
        margin-left: 20%;
        padding: 0 30px;
    }
    .form-header {
        width: auto;
        padding: 15px 0;
    }
    .row.select-line {
        flex-direction: row;
    }
}

/*-------------------------------------------
 14.3) FLEXBOX VENDOR PREFIXES (Opera, Firefox, Chrome)
-------------------------------------------*/
.sidebar,
.main-content,
.form-header,
.row.select-line {
    display: -webkit-box;      /* OLD - iOS 6-, Safari 3.1-6 */
    display: -ms-flexbox;      /* TWEENER - IE 10 */
    display: flex;             /* NEW, Spec */

    /* direção padrão */
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
}


/*-------------------------------------------
 15) COLUNAS FLEXÍVEIS
-------------------------------------------*/
.col-20 { flex: 0 0 20%; max-width: 20%; }
.col-30 { flex: 0 0 30%; max-width: 30%; }
.col-40 { flex: 0 0 40%; max-width: 40%; }
.col-60 { flex: 0 0 60%; max-width: 60%; }

/*-------------------------------------------
 16) IMAGENS
-------------------------------------------*/
.img-top {
    display: block;
    width: 45%;
    margin: 20px auto 10px;
}
.LogoFCP {
    width: 20%;
    display: block;
    margin: 0 auto;
    opacity: 0.3;
}

/*-------------------------------------------
 17) CUSTOM RADIO BUTTONS
-------------------------------------------*/
form fieldset {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    background-color: #f8f9fa;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
form fieldset legend {
    width: 100%;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}
.form-check {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 1rem;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background-color: #fff;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s;
}
.form-check:hover {
    background-color: #e9f5ff;
    border-color: #0d6efd;
}
.form-check-input[type="radio"] {
    appearance: none;
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #0d6efd;
    border-radius: 50%;
    background-color: #fff;
    position: relative;
    cursor: pointer;
    transition: background-color .2s, border-color .2s;
}
.form-check-input[type="radio"]::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.6rem;
    height: 0.6rem;
    background-color: #0d6efd;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform .1s ease-in-out;
}
.form-check-input[type="radio"]:checked::before {
    transform: translate(-50%, -50%) scale(1);
}
.form-check-label {
    margin-left: 0.5rem;
    cursor: pointer;
}
.form-check-input[type="radio"]:checked + .form-check-label {
    color: #0444a8;
}
.form-check-input[type="radio"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, .25);
}

/*-------------------------------------------
 18) SAUDAÇÃO
-------------------------------------------*/
#greeting {
    font-size: 0.9rem;
    font-weight: 400;
    color: #FFFF4A !important;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/*-------------------------------------------
 19) ANIMAÇÃO FADE-IN
-------------------------------------------*/
.fade-in {
    animation: fadeIn 0.5s ease-in-out forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/*-------------------------------------------
 20) MODAL & PREVIEW IMAGE
-------------------------------------------*/
.modal-content {
    border-radius: 10px;
}
.modal-header, .modal-footer {
    background-color: #f8f9fa;
}
.modal-body {
    padding: 2rem;
}
#preview-image {
    display: none;
    max-width: 100%;
    margin-top: 15px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0,0,0,0.1);
    animation: fadeIn 0.6s ease-in-out forwards;
}

/*-------------------------------------------
 21) TEMA DARK MODE
-------------------------------------------*/
body.dark-mode {
    background: #121212;
    color: #e0e0e0;
}
body.dark-mode .form-container,
body.dark-mode .form-contains {
    background: #1f1f1f;
}
body.dark-mode .modal-header,
body.dark-mode .modal-footer {
    background-color: #2c2c2c;
}
body.dark-mode #progress-bar-container {
    background-color: #333;
}
body.dark-mode #progress-bar {
    background: linear-gradient(90deg, #6f42c1 0%, #d63384 100%);
}

/*===========================================
  22 -TEXTAREA CONFIGURATION
  - Mantém toda a lógica original do projeto para outros HTMLs
  - Centraliza aqui apenas as regras específicas do textarea
===========================================*/
.textarea-container {
    flex: 1;
    position: relative;
    width: 100%;
    padding: 10px;
    background: url('/assets/img/FCPMarcaDagua.png') center/contain no-repeat;
}
.textarea-container textarea {
    width: 100%;
    height: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: none;
    overflow: hidden;
    background: transparent;
    font-size: .9rem;
    line-height: 1.4;
    scroll-behavior: auto;
}

/*-------------------------------------------
 23 - OVERRIDES DE ESPAÇAMENTO ENTRE CAMPOS
  (reduz gaps sem tocar nas regras originais)
-------------------------------------------*/
.form-contains input,
.form-contains select,
.form-contains textarea {
    /* antes: margin-bottom: 0.75rem; */
    margin-bottom: 0.5rem !important;
}

.form-label {
    /* antes: margin-bottom: 0.25rem; */
    margin-bottom: 0.2rem !important;
}

.row,
.row.select-line,
.form-main .row {
    /* reduz gap padrão entre linhas */
    margin-bottom: 3px !important;
}

/* se houver form-groups separados */
.form-group {
    margin-bottom: 0.5rem !important;
}

/* opcional: pra garantir nos breakpoints mobile/tablet/desktop */
@media (max-width: 1024px) {
    .form-contains input,
    .form-contains select,
    .form-contains textarea {
        margin-bottom: 0.4rem !important;
    }
    .row {
        margin-bottom: 2px !important;
    }
}

@media (min-width: 1025px) {
    .form-contains input,
    .form-contains select,
    .form-contains textarea {
        margin-bottom: 0.6rem !important;
    }
    .row {
        margin-bottom: 4px !important;
    }
}


/* ———————————————— *
   Alinha verticalmente os radio buttons
 * ———————————————— */

/* 1) Garante que cada form-check fique em linha e centralize itens */
.form-check {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem;
}

/* 2) Remove margens estranhas e força o rádio ao meio da linha */
.form-check-input[type="radio"] {
    margin: 0 !important;           /* zera margens padrão */
    vertical-align: middle !important;
    flex-shrink: 0;                  /* não encolha o círculo */
}

/* 3) Centraliza o texto ao lado do rádio */
.form-check-label {
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1 !important;      /* evita deslocamento por line-height alto */
}
