/* ===== OVERLAY ===== */
.vgi-modal-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999999;
    justify-content: center;
    align-items: center;
}

/* ===== MODAL ===== */
.vgi-modal-content {
    background: #ffffff;
    border-radius: 16px;
    width: 94%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    margin: 20px;
}

/* ===== HEADER ===== */
.vgi-modal-header {
    padding: 24px 28px 16px 28px;
    border-bottom: 1px solid #eef2f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafbfc;
    border-radius: 16px 16px 0 0;
}

.vgi-modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vgi-modal-header h2::before {
    content: '✨';
    font-size: 20px;
}

.vgi-modal-close {
    background: #f1f3f5;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.vgi-modal-close:hover {
    background: #e9ecef;
    color: #000;
    transform: rotate(90deg);
}

/* ===== BODY ===== */
.vgi-modal-body {
    padding: 28px 28px 24px 28px;
}

/* ===== FORM ===== */
.vgi-form-group {
    margin-bottom: 22px;
    position: relative;
}

.vgi-form-group:last-of-type {
    margin-bottom: 28px;
}

.vgi-form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
    letter-spacing: -0.2px;
}

.vgi-form-group label .required {
    color: #e53e3e;
    margin-left: 3px;
}

.vgi-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: #1a202c;
    transition: all 0.25s ease;
    outline: none;
    background: #f7fafc;
    box-sizing: border-box;
}

.vgi-form-group input::placeholder {
    color: #a0aec0;
    font-size: 14px;
}

.vgi-form-group input:focus {
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.vgi-form-group input.valido {
    border-color: #48bb78;
    background: #f0fff4;
    box-shadow: 0 0 0 4px rgba(72, 187, 120, 0.1);
}

.vgi-form-group input.valido:focus {
    border-color: #38a169;
    box-shadow: 0 0 0 4px rgba(72, 187, 120, 0.15);
}

.vgi-form-group input.invalido {
    border-color: #fc8181;
    background: #fff5f5;
    box-shadow: 0 0 0 4px rgba(252, 129, 129, 0.1);
}

.vgi-form-group input.invalido:focus {
    border-color: #e53e3e;
    box-shadow: 0 0 0 4px rgba(252, 129, 129, 0.15);
}

.vgi-form-group input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== MENSAGEM DE ERRO ===== */
.vgi-error-message {
    display: flex;
    color: #e53e3e;
    font-size: 12px;
    margin-top: 12px;
    font-weight: 500;
   
}

.vgi-error-message::before {
    content: '⚠️ ';
    font-size: 14px;
}

/* ===== BOTÕES ===== */
.vgi-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    border-top: 2px solid #f0f2f5;
}

.vgi-modal-cancel {
    padding: 10px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    color: #4a5568;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.vgi-modal-cancel:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

.vgi-modal-submit {
    padding: 10px 32px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.vgi-modal-submit:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.vgi-modal-submit:not(:disabled):active {
    transform: translateY(0px);
}

.vgi-modal-submit:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
}

.vgi-modal-submit.loading {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.8;
    cursor: wait;
}

/* ===== SCROLLBAR ===== */
.vgi-modal-content::-webkit-scrollbar {
    width: 6px;
}

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

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

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

/* ===== RESPONSIVO ===== */
@media (max-width: 600px) {
    .vgi-modal-content {
        width: 96%;
        margin: 10px;
        border-radius: 12px;
    }

    .vgi-modal-header {
        padding: 18px 20px 14px 20px;
    }

    .vgi-modal-header h2 {
        font-size: 19px;
    }

    .vgi-modal-body {
        padding: 20px 20px 18px 20px;
    }

    .vgi-form-group input {
        padding: 11px 14px;
        font-size: 14px;
    }

    .vgi-form-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .vgi-modal-cancel,
    .vgi-modal-submit {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
}