/* Overlay - Nền đen mờ */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
}

/* Popup Container - Hộp thông báo trắng */
.custom-alert-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: none;
}

/* Header */
.custom-alert-header {
    padding: 15px 20px 10px 20px;
    text-align: center;
    position: relative;
    margin: 0;
    border-bottom: 1px solid #e5e5e5;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 40px;
    padding-right: 40px;
}

/* Title */
.custom-alert-title {
    font-size: 18px;
    font-weight: 400;
    color: #000;
    margin: -8px 0 0 0; /* đẩy lên trên 5px */
    letter-spacing: 0.5px; /* nếu muốn giống hơn, thêm chút giãn chữ */
}

/* Close Button */
.custom-alert-close {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: #000;
    cursor: pointer;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-alert-close:hover {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
}

/* Body */
.custom-alert-body {
    padding: 15px 20px 15px 20px;
    text-align: left;
}

/* Message */
.custom-alert-message {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    font-size: 20px;
    font-weight: 400;
    color: #800020;
    margin: 0;
    line-height: 1.5;
    letter-spacing: 0.5px; /* nếu muốn giống hơn, thêm chút giãn chữ */
}

/* ==========================================================================
   Popup dạng icon + message + nút OK (showCustomAlert trong update-company.js,
   home.js). Trước đây các class dưới đây chưa có style nào -> icon/nút hiện
   mặc định của trình duyệt, lệch trái, xấu. Chuẩn hóa lại cho đồng bộ và
   chuyên nghiệp, dùng chung cho mọi trang.
   ========================================================================== */
.custom-alert-content {
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
}

.custom-alert-icon {
    font-size: 40px;
    line-height: 1;
}

.custom-alert-content .custom-alert-message {
    font-size: 16px;
    color: #333;
    word-wrap: break-word;
}

.custom-alert-icon.success,
.custom-alert-content.success .custom-alert-icon { color: #16a34a; }

.custom-alert-icon.error,
.custom-alert-content.error .custom-alert-icon { color: #dc2626; }

.custom-alert-icon.warning,
.custom-alert-content.warning .custom-alert-icon { color: #d97706; }

.custom-alert-icon.info,
.custom-alert-content.info .custom-alert-icon { color: #2563eb; }

.custom-alert-content.error .custom-alert-message { color: #800020; }

.custom-alert-button {
    display: block;
    width: auto;
    min-width: 120px;
    margin: 4px auto 0;
    padding: 12px 32px;
    background: #8B0000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.custom-alert-button:hover { background: #A52A2A; }
.custom-alert-button:active { transform: translateY(1px); }

.custom-alert-content.success .custom-alert-button { background: #16a34a; }
.custom-alert-content.success .custom-alert-button:hover { background: #15803d; }

.custom-alert-content.info .custom-alert-button { background: #2563eb; }
.custom-alert-content.info .custom-alert-button:hover { background: #1d4ed8; }

.custom-alert-content.warning .custom-alert-button { background: #d97706; }
.custom-alert-content.warning .custom-alert-button:hover { background: #b45309; }
