* {
    margin: 0;
    padding: 0;   

    font-family: 'Roboto', sans-serif; 
}

body
{
    background-color: rgb(248,250,252);
}

#form-container 
{   
    width: 100vw; 
    height: calc(100vw * 16 / 9);
    
    max-height: 100vh; 
    max-width: calc(100vh * 9 / 16); 
    
    margin: auto;
    overflow: hidden;

    position: relative;
}

.page 
{
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 80%;
    text-align: left;

    margin: 30% auto 0 auto;
}

.page.active 
{
    display: block !important;
    animation: moveit 0.5s forwards;
}

    @keyframes moveit {
        from { opacity: 0; transform: scale(0.9); }
        to { opacity: 1; transform: scale(1); }
    }


    .date-container {
        display: flex;
        flex-direction: row;
        width: 100%;
    }

    .date-container label {
        width: 100%;
        display: block;
        margin: 5px;
    }

    .date-container input {
        flex: 1;
        text-align: center;
        margin: 5px;
    }

    .button-group {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        margin: 5px;
        padding-top: 10px;
    }

    .date-container .separator {
        font-size: 20px;
        color: rgb(180, 180, 180);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nationality-selection
    {
        margin-bottom: 20px;
    }

    .nationality-selection label
    {
        display: block;
        margin-bottom: 5px;
        font-size: 16px;
    }

    
    .shake {
        animation: shake 0.5s ease-in-out !important;
    }
    
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            20%, 60% { transform: translateX(-10px); }
            40%, 80% { transform: translateX(10px); }
        }
label 
{
    font-size: 20px;
    font-weight: bold;
    color: #333;

    margin-bottom: 20px; /* Added margin-bottom */
    display: block; /* Ensure it works with flexbox */
}

.lgpd label, .lgpd a
{
    font-size: 16px;
    font-weight: normal;
}

input 
{
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 18px;
}

input:focus, input:active
{
    border-color: #6a1b9a;
}

button 
{
    background-color: #6a1b9a;
    color: white;
    border: none;
    padding: 10px;
    font-size: 22px;
    min-width: 50px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

button:hover 
{
    background-color: #4a148c;
}

a {
    font-size: 14px;
    color: #6a1b9a;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.button-group
{
    text-align: right;
}

.validation-message {
    display: none;

    position: absolute;
    left: 50%;
    top: 5%;
    transform: translateX(-50%); /* Center horizontally */

    z-index: 1000; /* Ensure it's above other elements */
    
    color: red;
    border: rgb(228, 163, 89) solid 1px;
    background: rgb(251, 252, 222);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

    width: 80%; /* Prevent it from exceeding #form-container */
    
    opacity: 1; /* Default visible */
    transition: opacity 1s ease-in-out; 

    font-size: small;
}

/* Class to trigger fade out after 5s */
.validation-message.show {
    gap: 10px;
    margin: 5px;
    display: table !important;

    animation: fadeOut 6s forwards; /* Animation to fade out */
}

.validation-message *
{
    width: auto;
    display: block;
    float: left;
    font-size: 16px;
    margin: 5px;
}

    /* Keyframes for fade out */
    @keyframes fadeOut {
        0% { opacity: 1; }
        80% { opacity: 1; }
        100% { opacity: 0; }
    }


.lgpd
{
    text-align: center;
    margin-top: 30px;
}

.lgpd input
{
    margin-left: 5px;
}

.modal-overlay {
    display: none; /* Initially hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Modal Box */
.modal {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 80%;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    animation: fadeIn 0.3s ease-in-out;
}

.modal .modal-content
{
    height: 400px;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 10px;

    -webkit-overflow-scrolling: touch; /* Enables smooth touch scrolling */
    touch-action: pan-y; /* Allows vertical scroll */
    user-select: none; /* Prevents selection */
}

.modal .modal-content p
{
    font-size: medium;
    text-align: justify;
    margin: 10px;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.modal h3
{
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ccc;
    font-size: x-large;
}

.modal a {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #6a1b9a;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: 0.3s;
    font-size: medium;
}

.modal a:hover {
    background-color: #4a148c;
}

/* Fade In Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Show Modal */
.modal-overlay.active {
    display: flex;
}