/* =====================================================
PROFESSIONAL MATERIAL DESIGN 3 CONFIRMATION DIALOG
Following Material Design 3 guidelines, Apple HIG, and Fluent UI principles
Modern, polished styling with proper elevation, spacing, and animations
===================================================== */

.material-confirmation-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100001; /* Above toast container */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 16px;
}

.material-confirmation-dialog.material-confirmation-show {
    opacity: 1;
    pointer-events: auto;
}

.material-confirmation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 20, 25, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.material-confirmation-dialog.material-confirmation-show .material-confirmation-overlay {
    opacity: 1;
}

.material-confirmation-content {
    position: relative;
    /* Light background for better readability */
    background: #FFFFFF;
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05) inset;
    width: 100%;
    max-width: 400px;
    padding: 24px;
    transform: scale(0.9) translateY(24px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    z-index: 1;
    overflow: hidden;
}

.material-confirmation-content.material-confirmation-content-show {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.material-confirmation-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px; /* Material Design 3 spacing between title and body */
}

.material-confirmation-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 20px; /* Fully rounded for Material Design 3 */
    padding: 8px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.material-confirmation-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.material-confirmation-icon-warning {
    background: rgba(245, 158, 11, 0.12); /* Material Design 3 surface tint */
    color: #F59E0B; /* Material Design 3 warning color */
}

.material-confirmation-icon-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #EF4444; /* Material Design 3 error color */
}

.material-confirmation-icon-info {
    background: rgba(59, 130, 246, 0.12);
    color: #3B82F6; /* Material Design 3 info color */
}

.material-confirmation-title {
    font-size: 20px;
    font-weight: 500;
    color: #1F2937; /* Dark text for light background */
    line-height: 1.4;
    letter-spacing: 0.15px;
    margin: 0;
    flex: 1;
    padding-top: 2px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

.material-confirmation-message {
    font-size: 14px;
    font-weight: 400;
    color: #6B7280; /* Secondary text for light background */
    line-height: 1.5;
    letter-spacing: 0.25px;
    margin-bottom: 24px;
    padding-left: 56px; /* Icon width (40px) + gap (16px) */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

.material-confirmation-actions {
    display: flex;
    gap: 8px; /* Material Design 3 button spacing */
    justify-content: flex-end;
    margin-top: 0;
    padding-top: 0;
}

.material-confirmation-button {
    padding: 10px 24px; /* Material Design 3 button padding */
    border-radius: 20px; /* Material Design 3 button corner radius */
    font-size: 14px;
    font-weight: 500; /* Material Design 3 medium weight */
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 40px; /* Material Design 3 button height */
    min-width: 64px; /* Material Design 3 minimum button width */
    letter-spacing: 0.1px;
    -webkit-tap-highlight-color: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    position: relative;
    overflow: hidden;
}

/* Material Design 3 Ripple Effect */
.material-confirmation-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.material-confirmation-button:active::before {
    width: 300px;
    height: 300px;
}

.material-confirmation-button-cancel {
    background: rgba(240, 240, 240, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #3B82F6;
    border: 1px solid rgba(59, 130, 246, 0.2);
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.material-confirmation-button-cancel:hover {
    background: rgba(230, 230, 230, 0.95);
    color: #2563EB;
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.material-confirmation-button-cancel:active {
    background: rgba(220, 220, 220, 0.95);
    transform: scale(0.98);
}

.material-confirmation-button-cancel:focus-visible {
    outline: 2px solid rgba(0, 0, 0, 0.12);
    outline-offset: 2px;
}

.material-confirmation-button-confirm {
    color: #FFFFFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12),
                0 1px 2px rgba(0, 0, 0, 0.24); /* Material Design 3 button elevation */
    position: relative;
}

/* Ensure buttons are properly visible on mobile */
@media (max-width: 480px) {
    .material-confirmation-button-confirm.material-confirmation-button-warning {
        background: #F59E0B !important;
        color: #FFFFFF !important;
    }
    
    .material-confirmation-button-confirm.material-confirmation-button-danger {
        background: #EF4444 !important;
        color: #FFFFFF !important;
    }
    
    .material-confirmation-button-confirm.material-confirmation-button-info {
        background: #3B82F6 !important;
        color: #FFFFFF !important;
    }
}

.material-confirmation-button-warning {
    background: #F59E0B; /* Material Design 3 warning color */
}

.material-confirmation-button-warning:hover {
    background: #D97706;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3),
                0 1px 2px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.material-confirmation-button-warning:active {
    background: #B45309;
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.material-confirmation-button-warning:focus-visible {
    outline: 2px solid rgba(245, 158, 11, 0.5);
    outline-offset: 2px;
}

.material-confirmation-button-danger {
    background: #EF4444; /* Material Design 3 error color */
}

.material-confirmation-button-danger:hover {
    background: #DC2626;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3),
                0 1px 2px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.material-confirmation-button-danger:active {
    background: #B91C1C;
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.material-confirmation-button-danger:focus-visible {
    outline: 2px solid rgba(239, 68, 68, 0.5);
    outline-offset: 2px;
}

.material-confirmation-button-info {
    background: #3B82F6; /* Material Design 3 primary color */
}

.material-confirmation-button-info:hover {
    background: #2563EB;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3),
                0 1px 2px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.material-confirmation-button-info:active {
    background: #1D4ED8;
    transform: translateY(0) scale(0.98);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.material-confirmation-button-info:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

/* Responsive Design - Material Design 3 Mobile Guidelines */
@media (max-width: 480px) {
    .material-confirmation-dialog {
        padding: 0;
        align-items: flex-end; /* Position at bottom on mobile */
        justify-content: center;
    }

    .material-confirmation-content {
        padding: 20px;
        max-width: 100%;
        width: 100%;
        border-radius: 28px 28px 0 0; /* Material Design 3 bottom sheet style on mobile */
        margin-top: auto;
        margin-bottom: 0;
        transform: translateY(100%); /* Start off-screen */
    }
    
    .material-confirmation-content.material-confirmation-content-show {
        transform: translateY(0); /* Slide up on show */
    }

    .material-confirmation-message {
        padding-left: 0;
        margin-top: 12px;
        font-size: 14px;
    }

    .material-confirmation-header {
        flex-direction: row; /* Keep horizontal on mobile for better readability */
        align-items: flex-start;
        text-align: left;
        gap: 12px;
    }

    .material-confirmation-icon {
        width: 36px;
        height: 36px;
        border-radius: 18px;
    }

    .material-confirmation-icon svg {
        width: 20px;
        height: 20px;
    }

    .material-confirmation-title {
        text-align: left;
        padding-top: 4px;
        font-size: 18px;
    }

    .material-confirmation-actions {
        flex-direction: column-reverse; /* Material Design 3: primary action on bottom */
        width: 100%;
        gap: 8px;
        margin-top: 20px;
    }

    .material-confirmation-button {
        width: 100%;
        min-height: 48px; /* Larger touch target on mobile */
        font-size: 15px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .material-confirmation-content {
        border: 2px solid rgba(0, 0, 0, 0.2);
    }
    
    .material-confirmation-button {
        border: 1px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .material-confirmation-dialog,
    .material-confirmation-content,
    .material-confirmation-button,
    .material-confirmation-overlay {
        transition: none;
    }
    
    .material-confirmation-content {
        transform: none;
    }
}



