:root {
    --mg-primary-color: #3483fa;
    --mg-secondary-color: #972123;
    --mg-text-color: #333333;
    --mg-link-color: #3483fa;
    --mg-bg-color: #ededed;
    --mg-border-color: #cccccc;
    --mg-error-color: #ff0000;
}

.mg-content {
    font-family: 'Roboto', sans-serif;
    background-color: var(--mg-bg-color);
    margin: 0;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    align-items: center;
}

.mg-top-banner {
    background-color: var(--mg-secondary-color);
    width: 100%;
    padding: 1em 0;
    height: 30vh;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.mg-input:disabled {
    background-color: #e9ecef;
    opacity: 0.7;
    cursor: not-allowed;
}

.mg-button:disabled {
    cursor: not-allowed;
}

.mg-top-banner .mg-logo {
    max-width: 150px;
}

.mg-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    filter: none;
    opacity: 0.7;
}

.mg-input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

.mg-container {
    background-color: #fff;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-sizing: border-box;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-top: -80px;
}

.mg-title {
    text-align: center;
    font-size: 24px;
    font-weight: 400;
    color: var(--mg-text-color);
    margin-bottom: 25px;
}

.mg-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--mg-text-color);
}

.mg-input {
    width: 100% !important;
    padding: 12px 10px !important;
    border: 1px solid var(--mg-border-color);
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    color: var(--mg-text-color);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.mg-input:focus {
    border-color: var(--mg-primary-color);
    box-shadow: 0 0 0 3px rgba(52, 131, 250, 0.2);
    outline: none;
}

#mg-registration-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mg-checkbox-group {
    display: flex;
    position: relative;
    align-items: flex-start;
    padding: 0.5em;
}

.mg-checkbox {
    margin-right: 10px;
    margin-top: 3px;
}

.mg-checkbox-label {
    font-size: 14px;
    color: #777;
}

.mg-link {
    color: var(--mg-link-color);
    text-decoration: none;
}

.mg-link:hover {
    text-decoration: underline;
}

.mg-button {
    width: 100%;
    padding: 14px;
    background-color: var(--mg-secondary-color);
    transition: filter 0.3s;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    margin-top: 20px;
}

.mg-button:hover {
    filter: brightness(0.9);
}

.mg-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
    font-size: 14px;
    color: #999;
}

.mg-divider::before,
.mg-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ccc;
}

.mg-divider:not(:empty)::before {
    margin-right: .25em;
}

.mg-divider:not(:empty)::after {
    margin-left: .25em;
}

.mg-form-group {
    position: relative;
    padding: 1em 0;
}

.mg-error-message {
    color: var(--mg-error-color);
    font-size: 12px;
    margin-top: 4px;
    display: none;
    position: absolute;
    bottom: -25px;
}

.mg-input-with-icon {
    position: relative;
    width: 100% !important;
}

.mg-password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    font-size: 18px;
    transition: color 0.3s ease;
}

.mg-input.error {
    border-color: #dc3545;
    outline: #dc3545;
    box-shadow: 0 0 0 3px rgba(220,
            53,
            69, 0.2);
}

.mg-input.error:active {
    outline: #dc3545;
}

.mg-error-message {
    color: #dc3545;
    /* Cor do texto da mensagem */
    font-size: 0.875rem;
    /* Tamanho da fonte */
    margin-top: 0.25rem;
    /* Espaçamento superior */
    display: block;
    /* Garante que a mensagem seja exibida em uma nova linha */
}

.mg-password-toggle:hover {
    color: var(--mg-text-color);
}

.mg-password-requirements {
    display: none;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 15px;
    margin-top: 10px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.mg-password-requirements ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.mg-password-requirements li {
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

/* Base para os ícones */
.mg-password-requirements li::before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 8px;
}

/* Estilo para requisito válido (check) */
.mg-password-requirements li.valid {
    color: #28a745;
    /* Verde */
}

.mg-password-requirements li.valid::before {
    content: "\f00c";
    /* Código Unicode para o ícone de 'check' */
    color: #28a745;
}

/* Estilo para requisito inválido (X) */
.mg-password-requirements li.invalid {
    color: #dc3545;
    /* Vermelho */
}

.mg-password-requirements li.invalid::before {
    content: "\f00d";
    /* Código Unicode para o ícone de 'times' (X) */
    color: #dc3545;
}

.mg-input.mg-error {
    border-color: var(--mg-error-color);
}

.mg-checkbox-label.mg-error {
    color: var(--mg-error-color);
}

/* Responsividade - Desktop, Tablet e Mobile 
*/
/* Tablets e celulares (até 768px) */
@media (max-width: 768px) {
    .mg-container {
        padding: 30px 20px;
        margin-top: -60px;
    }

    .mg-title {
        font-size: 22px;
    }
}

/* Celulares (até 480px) */
@media (max-width: 480px) {
    body {
        min-height: auto;
        /* Permite o corpo rolar em telas muito pequenas */
    }

    .mg-top-banner {
        height: 20vh;
        /* Faixa amarela menor para telas menores */
    }

    .mg-container {
        margin: 0px;
        padding: 20px;
        box-shadow: none;
        /* Remove a sombra em celulares para um visual mais limpo */
        border-radius: 0;
        /* Remove o border-radius */
    }

    .mg-top-banner .mg-logo {
        max-width: 120px;
    }

    .mg-checkbox-group {
        gap: 0.75rem;
        align-items: stretch;
    }

    .mg-checkbox {
        margin-right: 0;
        margin-bottom: 10px;
    }
}