/**
 * Custom Confirmation Dialog Styles
 *
 * Design: Minimal, compact, clean
 * - No header/title bar - just message and buttons
 * - Compact padding and smaller buttons
 */

/* =========================================================================
   Backdrop
   ========================================================================= */

.confirm-dialog-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;

    /* Animation: fade in */
    opacity: 0;
    transition: opacity 0.15s ease-out;
}

.confirm-dialog-backdrop.confirm-dialog-visible {
    opacity: 1;
}

.confirm-dialog-backdrop.confirm-dialog-closing {
    opacity: 0;
}

/* =========================================================================
   Dialog Box
   ========================================================================= */

.confirm-dialog {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 280px;
    width: 100%;
    overflow: hidden;

    /* Animation: scale + fade in */
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
}

.confirm-dialog.confirm-dialog-visible {
    opacity: 1;
    transform: scale(1);
}

.confirm-dialog.confirm-dialog-closing {
    opacity: 0;
    transform: scale(0.95);
}

/* =========================================================================
   Body (Message only - no header)
   ========================================================================= */

.confirm-dialog-body {
    padding: 1rem 1rem 0.75rem;
    text-align: center;
}

.confirm-dialog-message {
    margin: 0;
    font-size: 0.8125rem;
    color: #374151;
    line-height: 1.5;
}

/* =========================================================================
   Footer (Buttons) - Compact
   ========================================================================= */

.confirm-dialog-footer {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem 0.875rem;
    justify-content: center;
}

.confirm-dialog-btn {
    flex: 1;
    padding: 0.375rem 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.1s ease;
    border: 1px solid transparent;
    line-height: 1.4;
}

.confirm-dialog-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

/* Cancel Button */
.confirm-dialog-btn-cancel {
    background-color: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
}

.confirm-dialog-btn-cancel:hover {
    background-color: #e5e7eb;
    color: #4b5563;
}

/* Confirm Button (Default - Blue) */
.confirm-dialog-btn-confirm {
    background-color: #2563eb;
    color: #ffffff;
}

.confirm-dialog-btn-confirm:hover {
    background-color: #1d4ed8;
}

/* Destructive Confirm Button (Red) */
.confirm-dialog-btn-destructive {
    background-color: #dc2626;
}

.confirm-dialog-btn-destructive:hover {
    background-color: #b91c1c;
}

/* =========================================================================
   Mobile: Centered (no bottom sheet)
   ========================================================================= */

@media (max-width: 480px) {
    .confirm-dialog-backdrop {
        padding: 1rem;
    }

    .confirm-dialog {
        max-width: 260px;
    }

    .confirm-dialog-btn {
        padding: 0.4rem 0.875rem;
        font-size: 0.8125rem;
    }
}

/* =========================================================================
   Accessibility: Reduce Motion
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {

    .confirm-dialog-backdrop,
    .confirm-dialog {
        transition: none;
    }
}
