/* ==========================================================================
   APP-DIALOGS.CSS — Shared Custom Alert & Confirm Modal Component
   ========================================================================== */

.app-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.app-dialog-overlay.active {
    opacity: 1;
    visibility: visible;
}

.app-dialog-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
    width: 100%;
    max-width: 420px;
    padding: 24px 24px 20px 24px;
    box-sizing: border-box;
    text-align: center;
    transform: scale(0.92);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.app-dialog-overlay.active .app-dialog-card {
    transform: scale(1);
}

/* Icon Badge */
.app-dialog-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    margin: 0 auto 16px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* Type Variations */
.app-dialog-card.type-success .app-dialog-icon-wrap {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.app-dialog-card.type-error .app-dialog-icon-wrap {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}
.app-dialog-card.type-warning .app-dialog-icon-wrap {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.app-dialog-card.type-info .app-dialog-icon-wrap {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Header & Body Text */
.app-dialog-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.app-dialog-message {
    margin: 0 0 20px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
    word-break: break-word;
    max-height: 240px;
    overflow-y: auto;
    padding: 0 4px;
}

/* Button Layout */
.app-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.app-dialog-btn {
    flex: 1;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    box-sizing: border-box;
}

.app-dialog-btn:active {
    transform: scale(0.97);
}

.app-dialog-btn-cancel {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.app-dialog-btn-cancel:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.app-dialog-btn-confirm {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.app-dialog-btn-confirm:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

/* Type Specific Action Button Accent */
.app-dialog-card.type-error .app-dialog-btn-confirm {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}
.app-dialog-card.type-error .app-dialog-btn-confirm:hover {
    background: #b91c1c;
}

.app-dialog-card.type-success .app-dialog-btn-confirm {
    background: #059669;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}
.app-dialog-card.type-success .app-dialog-btn-confirm:hover {
    background: #047857;
}

.app-dialog-card.type-warning .app-dialog-btn-confirm {
    background: #d97706;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}
.app-dialog-card.type-warning .app-dialog-btn-confirm:hover {
    background: #b45309;
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .app-dialog-card {
        padding: 20px 16px 16px 16px;
        border-radius: 14px;
    }
    .app-dialog-icon-wrap {
        width: 48px;
        height: 48px;
        font-size: 20px;
        margin-bottom: 12px;
    }
    .app-dialog-title {
        font-size: 16px;
    }
    .app-dialog-message {
        font-size: 13.5px;
        margin-bottom: 16px;
    }
}
