/* ============================================================ */
/* MODAL DE FORMULÁRIO DE MENSAGEM - ESTILOS */
/* TODOS os estilos com escopo para evitar conflitos */
/* ============================================================ */

.message-form-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10500;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.message-form-modal .message-form-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-form-modal .message-form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.message-form-modal .message-form-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
}

.message-form-modal .message-form-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.message-form-modal .message-form-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.message-form-modal .message-form-body {
    padding: 32px;
}

.message-form-modal .message-form-info {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.message-form-modal .message-form-info i {
    font-size: 1.5rem;
    color: #667eea;
    margin-top: 2px;
}

.message-form-modal .message-form-info p {
    margin: 0 0 8px 0;
    color: #475569;
    line-height: 1.6;
}

.message-form-modal .message-form-info p:last-child {
    margin-bottom: 0;
}

.message-form-modal .message-form-alert {
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.message-form-modal .alert-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
}

.message-form-modal .alert-danger {
    background: #fee2e2;
    border-left: 4px solid #ef4444;
}

.message-form-modal .message-form-alert i {
    font-size: 1.5rem;
    margin-top: 2px;
}

.message-form-modal .alert-warning i {
    color: #f59e0b;
}

.message-form-modal .alert-danger i {
    color: #ef4444;
}

.message-form-modal .message-form-alert strong {
    display: block;
    margin-bottom: 4px;
    color: #0f172a;
}

.message-form-modal .message-form-alert p {
    margin: 0;
    color: #475569;
}

.message-form-modal .form-group {
    margin-bottom: 20px;
}

.message-form-modal .form-group label {
    display: block;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.message-form-modal .required {
    color: #ef4444;
}

.message-form-modal .form-control-readonly {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    background: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
}

.message-form-modal .form-control-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

.message-form-modal .form-control-textarea:focus {
    outline: none;
    border-color: #667eea;
}

.message-form-modal .form-hint {
    display: block;
    font-size: 0.85rem;
    color: #10b981;
    margin-top: 6px;
}

.message-form-modal .form-hint i {
    margin-right: 4px;
}

.message-form-modal .char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 6px;
}

.message-form-modal .form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.message-form-modal .btn-secondary,
.message-form-modal .btn-primary {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.message-form-modal .btn-secondary {
    background: #e2e8f0;
    color: #64748b;
}

.message-form-modal .btn-secondary:hover {
    background: #cbd5e0;
}

.message-form-modal .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.message-form-modal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.message-form-modal .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    .message-form-modal .message-form-content {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .message-form-modal .message-form-header {
        border-radius: 0;
    }
}