/**
 * Min Thein Kha Platform - Custom Dialog & Alert System
 * Astrological Mystical Deep Indigo & Warm Gold Theme
 * Burmese Unicode Optimized (Pyidaungsu, UMOE)
 */

/* ==========================================================================
   Custom Modal Backdrop & Wrapper
   ========================================================================== */
.custom-dialog-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-dialog-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

/* Modal Card */
.custom-dialog-modal {
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    border-radius: 1.5rem;
    padding: 2.25rem 1.75rem 1.75rem;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
    text-align: center;
    transform: scale(0.9) translateY(12px);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.45, 0.64, 1), opacity 0.2s ease;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.custom-dialog-backdrop.show .custom-dialog-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Subtle Top Decorative Gradient Bar */
.custom-dialog-modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #d4af37, #f59e0b, #ef4444);
}

.custom-dialog-modal.type-success::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.custom-dialog-modal.type-warning::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.custom-dialog-modal.type-danger::before {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.custom-dialog-modal.type-info::before {
    background: linear-gradient(90deg, #0ea5e9, #2563eb);
}

/* ==========================================================================
   Animated Icons
   ========================================================================== */
.custom-dialog-icon-wrapper {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    position: relative;
    font-size: 2.2rem;
    line-height: 1;
}

/* Danger / Delete Icon */
.custom-dialog-icon-wrapper.danger {
    background: #fee2e2;
    color: #dc2626;
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.15);
    animation: customPulseDanger 2.2s infinite;
}

@keyframes customPulseDanger {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35); }
    70% { box-shadow: 0 0 0 16px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Warning Icon */
.custom-dialog-icon-wrapper.warning {
    background: #fef3c7;
    color: #d97706;
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.18);
    animation: customPulseWarning 2.2s infinite;
}

@keyframes customPulseWarning {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    70% { box-shadow: 0 0 0 16px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Success Icon */
.custom-dialog-icon-wrapper.success {
    background: #dcfce7;
    color: #16a34a;
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.18);
    animation: customPulseSuccess 2.2s infinite;
}

@keyframes customPulseSuccess {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    70% { box-shadow: 0 0 0 16px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Info Icon */
.custom-dialog-icon-wrapper.info {
    background: #e0f2fe;
    color: #0284c7;
    box-shadow: 0 0 0 8px rgba(14, 165, 233, 0.18);
    animation: customPulseInfo 2.2s infinite;
}

@keyframes customPulseInfo {
    0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4); }
    70% { box-shadow: 0 0 0 16px rgba(14, 165, 233, 0); }
    100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

/* ==========================================================================
   Typography
   ========================================================================== */
.custom-dialog-title {
    font-family: 'Pyidaungsu', 'UMOE', sans-serif !important;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.65rem;
    line-height: 1.45;
}

.custom-dialog-body {
    font-family: 'Pyidaungsu', 'UMOE', sans-serif !important;
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.65;
    margin-bottom: 1.5rem;
    word-break: break-word;
}

.custom-dialog-highlight {
    color: #dc2626;
    font-weight: 600;
    display: inline-block;
    margin: 0.25rem 0;
}

/* ==========================================================================
   Buttons & Actions
   ========================================================================== */
.custom-dialog-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.custom-dialog-btn {
    border-radius: 50rem;
    padding: 0.65rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: none;
    outline: none;
    font-family: 'Pyidaungsu', 'UMOE', sans-serif !important;
    text-decoration: none;
}

.custom-dialog-btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Cancel Button */
.custom-dialog-btn-cancel {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.custom-dialog-btn-cancel:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: translateY(-1px);
}

/* Danger Confirm Button */
.custom-dialog-btn-danger {
    background: #dc2626;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.custom-dialog-btn-danger:hover {
    background: #b91c1c;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.45);
}

/* Warning Confirm Button */
.custom-dialog-btn-warning {
    background: #f59e0b;
    color: #000000;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.custom-dialog-btn-warning:hover {
    background: #d97706;
    color: #000000;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}

/* Success Confirm Button */
.custom-dialog-btn-success {
    background: #16a34a;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.custom-dialog-btn-success:hover {
    background: #15803d;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.45);
}

/* Info Confirm Button */
.custom-dialog-btn-info {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.custom-dialog-btn-info:hover {
    background: #0369a1;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.45);
}

/* ==========================================================================
   Custom Toast Notifications
   ========================================================================== */
.custom-toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.custom-toast {
    pointer-events: auto;
    background: #ffffff;
    border-radius: 1rem;
    padding: 0.85rem 1.25rem;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 280px;
    max-width: 440px;
    font-family: 'Pyidaungsu', 'UMOE', sans-serif !important;
    font-size: 0.95rem;
    font-weight: 500;
    color: #1e293b;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.custom-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.custom-toast.hide {
    transform: translateY(15px);
    opacity: 0;
}

.custom-toast-icon {
    font-size: 1.35rem;
    flex-shrink: 0;
    line-height: 1;
}

.custom-toast.success .custom-toast-icon { color: #16a34a; }
.custom-toast.error .custom-toast-icon { color: #dc2626; }
.custom-toast.warning .custom-toast-icon { color: #d97706; }
.custom-toast.info .custom-toast-icon { color: #0284c7; }

@media (max-width: 576px) {
    .custom-toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
    .custom-toast {
        min-width: 100%;
        max-width: 100%;
    }
}
