/* css/global.css */
:root {
    --primary: #006666;
    --secondary: #009999;
    --light: #e6f2f0;
    --dark: #003333;
    --text-light: #a3d1d1;
    --error: #d32f2f;
    --floating-menu-bg: #8B0000;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

.site-header {
    background: transparent;
    color: var(--dark);
    padding: 0.5rem; /* Reduzido para minimizar impacto */
    text-align: center;
    margin: 0; /* Removido margem extra */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.form-container {
    max-width: 800px;
    margin: 1rem auto; /* Ajustado para centralizar sem sobreposição */
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem 2rem 2rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    box-sizing: border-box;
    position: relative; /* Garantir que o formulário não seja afetado pelo menu */
    z-index: 1; /* Abaixo do pop-up (z-index: 1000), mas acima do fundo */
}

/* Estilos do formulário (mantidos do CSS antigo) */
.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--secondary);
}

.form-section h2 {
    color: var(--secondary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.form-group, .checkboxes {
    margin-bottom: 1.5rem;
}

.form-group {
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary);
}

.required::after {
    content: " *";
    color: var(--error);
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    transition: border 0.3s;
    box-sizing: border-box;
    background: #ffffff;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23006666'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 1rem;
}

#sugestoes-cidade {
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: transparent;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    box-sizing: border-box;
    left: 0;
    top: 100%;
}

#sugestoes-cidade div {
    padding: 0.8rem;
    color: var(--dark);
    cursor: pointer;
    background: var(--light);
    transition: background 0.3s;
    border-bottom: 1px solid #d0e6e3;
}

#sugestoes-cidade div:last-child {
    border-bottom: none;
}

#sugestoes-cidade div:hover {
    background: #d0e6e3;
}

.radio-group, .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.radio-option, .checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.govbr-alert {
    background: var(--light);
    border: 1px solid #d0e6e3;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    margin-left: 1rem;
    font-size: 0.9rem;
    color: var(--dark);
    display: none;
}

.govbr-alert a {
    color: var(--primary);
    text-decoration: underline;
    transition: color 0.3s;
}

.govbr-alert a:hover {
    color: var(--secondary);
}

.upload-area {
    border: 2px dashed var(--secondary);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area:hover {
    background-color: rgba(0, 153, 153, 0.05);
}

.upload-icon {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.file-list {
    margin-top: 1rem;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--dark);
}

.file-list-header .clear-all-btn {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 400;
    padding: 0.2rem 0.5rem;
    text-decoration: underline;
    line-height: 1;
    display: inline-block;
    transition: color 0.3s;
}

.file-list-header .clear-all-btn:hover {
    color: #b71c1c;
}

#fileItemsContainer,
#otherDocsItemsContainer {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 0.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.file-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 0.5rem;
}

.file-info {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 0.8rem;
    color: #666;
}

.file-item .move-up-btn,
.file-item .move-down-btn,
.file-item .remove-file-btn {
    background: none;
    border: none;
    color: var(--secondary);
    font-size: 1.2rem;
    padding: 0 0.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.file-item .move-up-btn:hover,
.file-item .move-down-btn:hover {
    color: var(--primary);
}

.file-item .remove-file-btn {
    color: var(--error);
}

.file-item .move-up-btn[disabled],
.file-item .move-down-btn[disabled] {
    color: #ccc;
    cursor: not-allowed;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

button {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

button[type="submit"] {
    background: var(--secondary);
    color: white;
}

button[type="submit"]:hover {
    background: var(--primary);
}

button[type="button"] {
    background: #f5f5f5;
    color: var(--dark);
    border: 1px solid #ddd;
}

button[type="button"]:hover {
    background: #e0e0e0;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.modal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.modal-content p {
    font-size: 1rem;
    color: var(--dark);
}

.code-display {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 1rem 0;
}

.code-display span {
    background: var(--light);
    padding: 10px;
    border-radius: 4px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--dark);
}

.modal-content input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.modal-content button {
    padding: 10px 20px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
}

.modal-content button:first-of-type {
    background: var(--primary);
    color: #fff;
}

.modal-content button:last-of-type {
    background: #f5f5f5;
    color: var(--dark);
    border: 1px solid #ddd;
}

.site-footer {
    background-color: #004d4d;
    color: #a3d1d1;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    text-align: center;
}