/**
 * Dialog Alert Styles - Exact Screenshot Match (2nd Image - Logout Dialog)
 * Modern Glassmorphism with Centered Icon Layout
 * Updated: v2.0 - Exact match to logout confirmation dialog
 */

 #dialog-alert-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    pointer-events: none;
}

.dialog-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: all;
    z-index: 100000;
    padding: 20px;
}

.dialog-alert-overlay.show {
    opacity: 1;
    visibility: visible;
}

.dialog-alert-box {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    transform: scale(0.95) translateY(10px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: all;
    position: relative;
    border: none;
}

.dialog-alert-box[data-type="logout"] {
    background: #ffffff;
    border-radius: 16px;
}


.dialog-alert-overlay.show .dialog-alert-box {
    transform: scale(1) translateY(0);
}

/* Icon Container - Centered */
.dialog-alert-icon-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 28px 32px 20px 32px;
    position: relative;
    z-index: 2;
}

.dialog-alert-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    position: relative;
    overflow: hidden;
}

.dialog-alert-icon svg {
    width: 32px;
    height: 32px;
    position: relative;
    z-index: 2;
    stroke-width: 2;
    color: #3b82f6;
}


/* Success Icon Styling */
.dialog-alert-icon[data-type="success"] {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.08));
    box-shadow: 
        0 8px 20px rgba(16, 185, 129, 0.2),
        0 0 0 1px rgba(16, 185, 129, 0.1) inset;
}

.dialog-alert-icon[data-type="success"] svg {
    color: #10b981;
}

/* Error Icon Styling */
.dialog-alert-icon[data-type="error"] {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.08));
    box-shadow: 
        0 8px 20px rgba(239, 68, 68, 0.2),
        0 0 0 1px rgba(239, 68, 68, 0.1) inset;
}

.dialog-alert-icon[data-type="error"] svg {
    color: #ef4444;
}

/* Info Icon Styling */
.dialog-alert-icon[data-type="info"],
.dialog-alert-icon:not([data-type]) {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.08));
    box-shadow: 
        0 8px 20px rgba(59, 130, 246, 0.2),
        0 0 0 1px rgba(59, 130, 246, 0.1) inset;
}

.dialog-alert-icon[data-type="info"] svg,
.dialog-alert-icon:not([data-type]) svg {
    color: #3b82f6;
}

/* Logout Icon Styling - Light Blue Circular Background with Darker Blue Icon */
.dialog-alert-box[data-type="logout"] .dialog-alert-icon-container .dialog-alert-icon,
.dialog-alert-icon[data-type="logout"] {
    background: #e0f2fe !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 56px !important;
    height: 56px !important;
}

.dialog-alert-box[data-type="logout"] .dialog-alert-icon-container .dialog-alert-icon svg,
.dialog-alert-box[data-type="logout"] .dialog-alert-icon svg,
.dialog-alert-icon[data-type="logout"] svg {
    color: #0284c7 !important;
    stroke: #0284c7 !important;
    fill: none !important;
    stroke-width: 2 !important;
    width: 24px !important;
    height: 24px !important;
}

/* Content Area - Centered */
.dialog-alert-content {
    padding: 0 32px 24px 32px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.dialog-alert-title {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.dialog-alert-box[data-type="logout"] .dialog-alert-title {
    color: #1e293b;
    font-size: 22px;
    margin-bottom: 6px;
}

.dialog-alert-message {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: #64748b;
    font-weight: 400;
}

.dialog-alert-box[data-type="logout"] .dialog-alert-message {
    color: #64748b;
    font-size: 14px;
}

/* Footer with Buttons */
.dialog-alert-footer {
    padding: 20px 32px 28px 32px;
    display: flex;
    justify-content: center;
    gap: 16px;
    position: relative;
    z-index: 2;
    background: transparent;
    border-top: none;
}

/* Button Styles */
.dialog-alert-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Left Button - Cancel (Text Only Style) */
.dialog-alert-btn-confirm:not(.dialog-alert-btn-primary),
.dialog-alert-btn-logout {
    background: rgb(188, 217, 242) !important;
    color: #3b82f6 !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: 600 !important;
}

/* Logout Dialog Specific Button Styling */
.dialog-alert-box[data-type="logout"] .dialog-alert-footer .dialog-alert-btn-confirm:not(.dialog-alert-btn-primary),
.dialog-alert-box[data-type="logout"] .dialog-alert-btn-confirm:not(.dialog-alert-btn-primary) {
    background: rgb(188, 217, 242) !important;
    color: #3b82f6 !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: 600 !important;
}

.dialog-alert-btn-confirm:not(.dialog-alert-btn-primary):hover,
.dialog-alert-btn-logout:hover,
.dialog-alert-box[data-type="logout"] .dialog-alert-footer .dialog-alert-btn-confirm:not(.dialog-alert-btn-primary):hover {
    background: rgba(59, 130, 246, 0.05) !important;
    color: #2563eb !important;
}

.dialog-alert-btn-confirm:not(.dialog-alert-btn-primary):active,
.dialog-alert-btn-logout:active,
.dialog-alert-box[data-type="logout"] .dialog-alert-footer .dialog-alert-btn-confirm:not(.dialog-alert-btn-primary):active {
    background: rgba(59, 130, 246, 0.1) !important;
}

/* Right Button - Primary Style (Cancel/OK) - Solid Blue */
.dialog-alert-btn-primary,
.dialog-alert-btn-confirm.dialog-alert-btn-primary {
    background: #3b82f6 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25) !important;
    border: none !important;
    font-weight: 600 !important;
}

.dialog-alert-btn-primary:hover,
.dialog-alert-btn-confirm.dialog-alert-btn-primary:hover {
    background: #2563eb !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35) !important;
    transform: translateY(-1px);
    color: #ffffff !important;
}

.dialog-alert-btn-primary:active,
.dialog-alert-btn-confirm.dialog-alert-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.3) !important;
    background: #1d4ed8 !important;
    color: #ffffff !important;
}

/* Cancel Button (Secondary style) */
.dialog-alert-btn-cancel {
    background: transparent;
    color: #3b82f6;
    border: none;
}

.dialog-alert-btn-cancel:hover {
    background: rgba(59, 130, 246, 0.05);
    color: #2563eb;
}

.dialog-alert-btn-cancel:active {
    background: rgba(59, 130, 246, 0.1);
}

/* Focus States */
.dialog-alert-btn:focus {
    outline: none;
}

.dialog-alert-btn-primary:focus,
.dialog-alert-btn-confirm.dialog-alert-btn-primary:focus {
    box-shadow: 
        0 0 0 3px rgba(59, 130, 246, 0.2),
        0 4px 12px rgba(59, 130, 246, 0.3);
}

.dialog-alert-btn-confirm:not(.dialog-alert-btn-primary):focus,
.dialog-alert-btn-cancel:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Success Button Colors */
.dialog-alert-box[data-type="success"] .dialog-alert-btn-primary,
.dialog-alert-box[data-type="success"] .dialog-alert-btn-confirm.dialog-alert-btn-primary {
    background: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.dialog-alert-box[data-type="success"] .dialog-alert-btn-primary:hover,
.dialog-alert-box[data-type="success"] .dialog-alert-btn-confirm.dialog-alert-btn-primary:hover {
    background: #059669;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.dialog-alert-box[data-type="success"] .dialog-alert-btn-confirm:not(.dialog-alert-btn-primary),
.dialog-alert-box[data-type="success"] .dialog-alert-btn-cancel {
    color: #10b981;
}

.dialog-alert-box[data-type="success"] .dialog-alert-btn-confirm:not(.dialog-alert-btn-primary):hover,
.dialog-alert-box[data-type="success"] .dialog-alert-btn-cancel:hover {
    background: rgba(16, 185, 129, 0.05);
    color: #059669;
}

/* Error Button Colors */
.dialog-alert-box[data-type="error"] .dialog-alert-btn-primary,
.dialog-alert-box[data-type="error"] .dialog-alert-btn-confirm.dialog-alert-btn-primary {
    background: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.dialog-alert-box[data-type="error"] .dialog-alert-btn-primary:hover,
.dialog-alert-box[data-type="error"] .dialog-alert-btn-confirm.dialog-alert-btn-primary:hover {
    background: #dc2626;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.dialog-alert-box[data-type="error"] .dialog-alert-btn-confirm:not(.dialog-alert-btn-primary),
.dialog-alert-box[data-type="error"] .dialog-alert-btn-cancel {
    color: #ef4444;
}

.dialog-alert-box[data-type="error"] .dialog-alert-btn-confirm:not(.dialog-alert-btn-primary):hover,
.dialog-alert-box[data-type="error"] .dialog-alert-btn-cancel:hover {
    background: rgba(239, 68, 68, 0.05);
    color: #dc2626;
}

/* Responsive Design */
@media (max-width: 640px) {
    .dialog-alert-overlay {
        padding: 16px;
    }

    .dialog-alert-box {
        max-width: 100%;
        border-radius: 16px;
    }

    .dialog-alert-box > div:first-child {
        padding: 24px 20px 0 20px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .dialog-alert-box[data-type="logout"] > div:first-child {
        padding: 24px 20px 0 20px;
    }

    .dialog-alert-icon-container {
        padding: 0;
        margin-bottom: 16px;
    }

    .dialog-alert-icon {
        width: 56px;
        height: 56px;
    }

    .dialog-alert-icon svg {
        width: 28px;
        height: 28px;
    }

    .dialog-alert-content {
        padding: 0;
        text-align: center;
    }

    .dialog-alert-title {
        font-size: 20px;
    }

    .dialog-alert-message {
        font-size: 14px;
    }

    .dialog-alert-footer {
        padding: 16px 20px 24px 20px;
        flex-direction: column;
    }

    .dialog-alert-btn {
        width: 100%;
    }
}

/* Animation for Icon */
@keyframes iconBounce {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.1) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.dialog-alert-overlay.show .dialog-alert-icon {
    animation: iconBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .dialog-alert-overlay,
    .dialog-alert-box,
    .dialog-alert-btn,
    .dialog-alert-icon {
        transition: none;
        animation: none;
    }
}
