/* ==========================================================
   Periferias Form — CSS
   Identidade: azul #035299 | vermelho #EF4B32 | laranja #FBA84A
   Fonte: Roboto | Nunito
========================================================== */

.periferias-form-wrapper {
    max-width: 860px;
    margin: 0 auto 60px;
    font-family: Roboto, sans-serif;
}

/* ----------------------------------------------------------
   SUCESSO
---------------------------------------------------------- */
.pf-success {
    text-align: center;
    padding: 60px 40px;
    background: #f7f9fc;
    border: 2px solid #b1d3e5;
    border-radius: 12px;
    margin-bottom: 40px;
}

.pf-success__icon {
    margin-bottom: 20px;
}

.pf-success h3 {
    color: #035299;
    font-size: 1.6rem;
    margin: 0 0 12px;
}

.pf-success p {
    color: #555;
    font-size: 16px;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto 28px;
}

/* ----------------------------------------------------------
   FORM GERAL
---------------------------------------------------------- */
.pf-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ----------------------------------------------------------
   SEÇÕES
---------------------------------------------------------- */
.pf-section {
    background: #fff;
    border: 1px solid #dde6ef;
    border-radius: 10px;
    padding: 28px 32px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .pf-section {
        padding: 20px 16px;
    }
}

.pf-section--consent {
    background: #f7f9fc;
    border-color: #b1d3e5;
}

.pf-section__title {
    font-family: Roboto, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #035299;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #b1d3e5;
}

.pf-section__desc {
    color: #666;
    font-size: 14px;
    margin: -8px 0 20px;
    line-height: 1.5;
}

/* ----------------------------------------------------------
   LINHAS E CAMPOS
---------------------------------------------------------- */
.pf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.pf-row:last-child {
    margin-bottom: 0;
}

.pf-row--three {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 768px) {
    .pf-row,
    .pf-row--three {
        grid-template-columns: 1fr;
    }
}

.pf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pf-field--full {
    grid-column: 1 / -1;
}

.pf-field--disabled input {
    opacity: 0.5;
    pointer-events: none;
}

.pf-field > label {
    font-size: 13px;
    font-weight: 700;
    color: #035299;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
}

.pf-optional {
    font-weight: 400;
    text-transform: none;
    color: #888;
    font-size: 12px;
    letter-spacing: 0;
}

/* Inputs e selects */
.pf-field input[type="text"],
.pf-field input[type="email"],
.pf-field select,
.pf-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #c5d5e8;
    border-radius: 6px;
    font-family: Roboto, sans-serif;
    font-size: 15px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.pf-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23035299' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 38px;
    cursor: pointer;
}

.pf-field select:disabled {
    background-color: #f0f4f8;
    color: #999;
    cursor: not-allowed;
}

.pf-field textarea {
    resize: vertical;
    min-height: 160px;
    line-height: 1.6;
}

.pf-field input:focus,
.pf-field select:focus,
.pf-field textarea:focus {
    border-color: #035299;
    box-shadow: 0 0 0 3px rgba(3, 82, 153, 0.1);
}

/* ----------------------------------------------------------
   DATA DE NASCIMENTO
---------------------------------------------------------- */
.pf-date-row {
    display: grid;
    grid-template-columns: 80px 1fr 100px;
    gap: 8px;
}

@media (max-width: 480px) {
    .pf-date-row {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.pf-date-row select {
    width: 100%;
    padding: 10px 10px;
    border: 1.5px solid #c5d5e8;
    border-radius: 6px;
    font-family: Roboto, sans-serif;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23035299' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.pf-date-row select:focus {
    border-color: #035299;
    box-shadow: 0 0 0 3px rgba(3, 82, 153, 0.1);
}

/* ----------------------------------------------------------
   CHECKBOX (anônimo)
---------------------------------------------------------- */
.pf-field__check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.pf-field__check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #035299;
    cursor: pointer;
    flex-shrink: 0;
}

.pf-checkbox-label {
    font-size: 14px;
    color: #555;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

/* ----------------------------------------------------------
   RADIO BUTTONS
---------------------------------------------------------- */
.pf-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pf-radio-group--inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
}

.pf-radio {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    line-height: 1.4;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.pf-radio input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #035299;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.pf-specify {
    display: block;
    margin-top: 6px;
    width: 100%;
    padding: 6px 10px;
    border: 1.5px solid #c5d5e8;
    border-radius: 4px;
    font-size: 13px;
    font-family: Roboto, sans-serif;
}

/* ----------------------------------------------------------
   ÁREA DE UPLOAD
---------------------------------------------------------- */
.pf-upload-area {
    border: 2px dashed #b1d3e5;
    border-radius: 10px;
    background: #f7f9fc;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 16px;
}

.pf-upload-area__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
}

.pf-drop-zone--active,
.pf-upload-area:hover {
    border-color: #035299;
    background: #eef3fb;
}

.pf-upload-area__inner p {
    font-size: 16px;
    color: #555;
    margin: 0;
}

.pf-upload-hint {
    font-size: 13px;
    color: #888;
}

.pf-link-btn {
    background: none;
    border: none;
    color: #035299;
    font-size: inherit;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.pf-link-btn:hover {
    color: #EF4B32;
}

/* ----------------------------------------------------------
   LISTA DE ARQUIVOS
---------------------------------------------------------- */
.pf-file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pf-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #dde6ef;
    border-radius: 8px;
    padding: 12px 14px;
    transition: border-color 0.2s;
}

.pf-file-item--done {
    border-color: #b3dfc0;
    background: #f6fff8;
}

.pf-file-item--error {
    border-color: #fbb;
    background: #fff8f8;
}

.pf-file-item__icon {
    font-size: 24px;
    flex-shrink: 0;
}

.pf-file-item__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pf-file-item__name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pf-file-item__size {
    font-size: 12px;
    color: #888;
}

.pf-file-item__bar {
    width: 100%;
    height: 4px;
    background: #e0e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 2px;
}

.pf-file-item__progress {
    height: 100%;
    background: #035299;
    border-radius: 2px;
    transition: width 0.2s;
}

.pf-file-item--done .pf-file-item__progress {
    background: #0a7c1e;
}

.pf-file-item__status {
    font-size: 12px;
    color: #666;
}

.pf-file-item__remove {
    background: none;
    border: none;
    color: #999;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.2s, background 0.2s;
}

.pf-file-item__remove:hover {
    color: #c00;
    background: #fff0f0;
}

/* ----------------------------------------------------------
   CONSENTIMENTO
---------------------------------------------------------- */
.pf-consent-text {
    background: #fff;
    border: 1px solid #c5d5e8;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
    max-height: 180px;
    overflow-y: auto;
}

.pf-consent-text p {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 10px;
}

.pf-consent-text p:last-child {
    margin: 0;
}

.pf-consent-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.pf-consent-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #035299;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.pf-consent-check span {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* ----------------------------------------------------------
   ERROS
---------------------------------------------------------- */
.pf-errors {
    background: #fff3f3;
    border: 1px solid #fbb;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 16px;
}

.pf-errors p {
    color: #c00;
    font-size: 14px;
    margin: 0;
}

/* ----------------------------------------------------------
   BOTÕES
---------------------------------------------------------- */
.pf-submit-row {
    display: flex;
    justify-content: center;
    padding: 8px 0 16px;
}

.pf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    padding: 0 40px;
    border-radius: 8px;
    border: none;
    font-family: Roboto, sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
}

.pf-btn--primary {
    background: #035299;
    color: #fff;
}

.pf-btn--primary:hover {
    background: #024280;
    color: #fff;
}

.pf-btn--submit {
    background: #EF4B32;
    color: #fff;
    min-width: 240px;
}

.pf-btn--submit:hover:not(:disabled) {
    background: #d43c25;
    transform: translateY(-1px);
}

.pf-btn--submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.pf-spinner {
    animation: pf-spin 0.8s linear infinite;
}

@keyframes pf-spin {
    to { transform: rotate(360deg); }
}

/* ----------------------------------------------------------
   ROADMAP
---------------------------------------------------------- */
.pf-roadmap {
    background: #f0f5fa;
    border-left: 4px solid #035299;
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.pf-roadmap p {
    font-size: 14px;
    color: #333;
    margin: 0 0 10px;
    line-height: 1.5;
}

.pf-roadmap ul {
    margin: 0;
    padding-left: 18px;
}

.pf-roadmap ul li {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 4px;
}

/* ----------------------------------------------------------
   RESPONSIVO
---------------------------------------------------------- */
@media (max-width: 480px) {
    .pf-btn--submit {
        width: 100%;
        min-width: unset;
    }

    .pf-section__title {
        font-size: 1rem;
    }
}
