/* VERSÃO FINAL COM POP-UP MODAL E BOTÃO UNIFICADO */

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap');

/* ... (todo o CSS do topo até .calendar-button:hover permanece o mesmo) ... */
:root {
    --primary-color: #0056b3;
    --background-color: #f4f7f9;
    --container-bg: #ffffff;
    --text-color: #333333;
    --border-color: #dce4e9;
    --success-bg: #e3f2fd;
    --success-border: #0056b3;
    --error-bg: #fde3e3;
    --error-border: #b30000;
}
body {
    margin: 0;
    font-family: 'Lato', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}
.container {
    width: 100%;
    max-width: 500px;
    background-color: var(--container-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
}
h2 {
    text-align: center;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 25px;
}
.form-group {
    margin-bottom: 20px;
}
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}
input[type="date"],
input[type="number"],
input[type="text"],
select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Lato', sans-serif;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #fff;
}
select {
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%230056b3%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}
button {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
button:hover {
    background-color: #004494;
}
.message-box {
    margin-top: 25px;
    padding: 15px;
    border-radius: 8px;
    border-left: 5px solid;
}
.result {
    background-color: var(--success-bg);
    border-color: var(--success-border);
}
.error {
    background-color: var(--error-bg);
    border-color: var(--error-border);
    color: #8b0000;
}
.aviso-legal {
    font-size: 12px;
    color: #555;
    text-align: center;
    margin-top: 15px;
    line-height: 1.4;
}
.calendar-button {
    display: block;
    text-align: center;
    margin: 15px auto 10px auto;
    padding: 12px 15px;
    background-color: #4285F4;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    max-width: 350px; /* Aumentado para caber o novo texto */
    line-height: 1.4; /* Melhora a legibilidade de múltiplas linhas */
    transition: background-color 0.3s ease;
}
.calendar-button:hover {
    background-color: #357ae8;
}

.qr-code-container {
    text-align: center;
    margin-top: 20px;
}
/* MODIFICADO: Removido o <p> de dentro do container do QR Code, então não precisamos mais de estilo para ele */
.qr-code-container img {
    max-width: 95%;
    height: auto;
    max-height: 180px;
    border: 1px solid var(--border-color);
    padding: 5px;
    border-radius: 8px;
    background-color: white;
}

.feedback-box {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}
.feedback-box p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.5;
}
.feedback-button {
    display: inline-block;
    background-color: #fca311;
    color: #14213d;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}
.feedback-button:hover {
    background-color: #e8950d;
}

/* NOVO: Estilos para o Pop-up Modal (substitui os estilos do "toast") */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.4s ease;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.modal-content p {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #555;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
}

.modal-ok-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.modal-ok-btn:hover {
    background-color: #004494;
}