/* ==========================================================================
   Custom Confirmation Modal - Mobile Friendly & Responsive
   ========================================================================== */

.custom-confirm-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center; /* Vertically centered */
    justify-content: center; /* Horizontally centered */
    padding: 16px;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.custom-confirm-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Card */
.custom-confirm-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.1),
        0 8px 10px -6px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    transform: scale(0.92) translateY(10px);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    margin: auto;
}

.custom-confirm-backdrop.active .custom-confirm-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Header & Icon Wrapper */
.custom-confirm-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 16px;
}

.custom-confirm-icon-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin-bottom: 16px;
    position: relative;
    transition: transform 0.3s ease;
}

.custom-confirm-backdrop.active .custom-confirm-icon-ring {
    transform: scale(1);
}

/* Danger Variant (Red) */
.custom-confirm-card[data-type="danger"] .custom-confirm-icon-ring {
    background: #fef2f2;
    color: #ef4444;
    box-shadow: 0 0 0 8px #fff5f5;
}

/* Warning Variant (Amber) */
.custom-confirm-card[data-type="warning"] .custom-confirm-icon-ring {
    background: #fffbe6;
    color: #d97706;
    box-shadow: 0 0 0 8px #fff9db;
}

/* Primary / Info Variant (Teal/Blue) */
.custom-confirm-card[data-type="primary"] .custom-confirm-icon-ring,
.custom-confirm-card[data-type="info"] .custom-confirm-icon-ring {
    background: #e6fffa;
    color: #0d9488;
    box-shadow: 0 0 0 8px #ccfbf1;
}

.custom-confirm-icon-ring svg {
    width: 28px;
    height: 28px;
    stroke-width: 2;
}

/* Title & Description */
.custom-confirm-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.custom-confirm-message {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
    word-break: break-word;
}

/* Action Buttons Container */
.custom-confirm-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    width: 100%;
}

.custom-confirm-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    min-height: 46px; /* Touch friendly height */
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Cancel Button */
.custom-confirm-btn-cancel {
    background-color: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    font-weight: 600 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.custom-confirm-btn-cancel:hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}

.custom-confirm-btn-cancel:focus-visible {
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.4) !important;
}

/* Danger Button */
.custom-confirm-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.custom-confirm-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
    transform: translateY(-1px);
}

.custom-confirm-btn-danger:focus-visible {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.4);
}

/* Warning Button */
.custom-confirm-btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.custom-confirm-btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
    transform: translateY(-1px);
}

/* Primary Button */
.custom-confirm-btn-primary {
    background: linear-gradient(135deg, #18b692 0%, #0d9488 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(24, 182, 146, 0.25);
}

.custom-confirm-btn-primary:hover {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    box-shadow: 0 6px 16px rgba(24, 182, 146, 0.35);
    transform: translateY(-1px);
}

.custom-confirm-btn-primary:focus-visible {
    box-shadow: 0 0 0 3px rgba(24, 182, 146, 0.4);
}

.custom-confirm-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Mobile Responsiveness (Vertically Centered Modal) */
@media (max-width: 480px) {
    .custom-confirm-backdrop {
        padding: 16px;
        align-items: center;
        justify-content: center;
    }

    .custom-confirm-card {
        width: 100%;
        max-width: 380px;
        border-radius: 20px;
        padding: 22px 18px;
        margin: auto;
    }

    .custom-confirm-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .custom-confirm-btn {
        width: 100%;
    }
}
