/* ==========================================================================
   PORTAL O.S. - MODERN DIALOG & CONFIRM MODAL SYSTEM (UI/UX)
   ========================================================================== */

/* Overlay Container */
.portal-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 15, 26, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.portal-dialog-backdrop.portal-dialog-active {
    opacity: 1;
    visibility: visible;
}

/* Modal Box */
.portal-dialog-box {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 35px rgba(59, 130, 246, 0.1);
    border-radius: 18px;
    padding: 28px 24px;
    box-sizing: border-box;
    text-align: center;
    transform: scale(0.92) translateY(10px);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.portal-dialog-backdrop.portal-dialog-active .portal-dialog-box {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Icon Container */
.portal-dialog-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 18px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    position: relative;
}

/* Danger / Excluir */
.portal-dialog-icon-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.25);
}

/* Warning */
.portal-dialog-icon-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fbbf24;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.25);
}

/* Success */
.portal-dialog-icon-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.25);
}

/* Info */
.portal-dialog-icon-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.35);
    color: #60a5fa;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.25);
}

/* Typography */
.portal-dialog-title {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.3;
}

.portal-dialog-message {
    margin: 0 0 24px 0;
    font-size: 0.92rem;
    color: #94a3b8;
    line-height: 1.55;
    word-break: break-word;
}

.portal-dialog-message strong {
    color: #f1f5f9;
}

/* Buttons Container */
.portal-dialog-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.portal-dialog-btn {
    border: none;
    border-radius: 8px;
    padding: 11px 20px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    flex: 1;
    min-height: 42px;
}

.portal-dialog-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.portal-dialog-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
}

.portal-dialog-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.portal-dialog-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.portal-dialog-btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

.portal-dialog-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

.portal-dialog-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.portal-dialog-btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.portal-dialog-btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
}

/* Toast Notification */
.portal-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.portal-toast {
    pointer-events: auto;
    background: rgba(16, 24, 39, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 12px 18px;
    color: #f1f5f9;
    font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: portalToastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 400px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@keyframes portalToastIn {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
