/* ============================================
   CUSTOM ALERT MODAL - DARK THEME
   ============================================ */

/* Modal Overlay */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-overlay-bg);
    -webkit-backdrop-filter: var(--modal-overlay-blur);
    backdrop-filter: var(--modal-overlay-blur);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Modal Container */
.custom-alert-modal {
    background: var(--modal-bg);
    border: 1px solid var(--tint-primary-bg);
    border-radius: var(--modal-radius);
    padding: 40px;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: var(--modal-shadow);
    transform: scale(0.7);
    opacity: 0;
    animation: modalPopIn 0.3s ease-out 0.1s forwards;
}

/* Keep the decorative brand glow only in dark. */
:root:not([data-theme="light"]) .custom-alert-modal {
    box-shadow: var(--modal-shadow), 0 0 40px rgba(158, 255, 0, 0.1);
}

@keyframes modalPopIn {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Close Button */
.custom-alert-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border-radius: 50%;
}

.custom-alert-close:hover {
    color: var(--color-text-primary);
    background: var(--tint-neutral-bg);
    transform: rotate(90deg);
}

/* Icon Container */
.custom-alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.custom-alert-icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: pulse 2s infinite;
}

.custom-alert-icon-circle::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--tint-primary-bg) 0%, transparent 70%);
    animation: glow 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px var(--tint-primary-bg);
    }
    50% {
        box-shadow: 0 0 40px var(--tint-primary-bg);
    }
}

@keyframes glow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.custom-alert-icon-circle i {
    font-size: 40px;
    color: var(--color-primary);
    z-index: 1;
}

/* Icon types */
.custom-alert-icon-circle.info i {
    color: var(--color-primary);
}

.custom-alert-icon-circle.warning i {
    color: var(--color-warning);
}

.custom-alert-icon-circle.error i {
    color: var(--color-danger);
}

.custom-alert-icon-circle.success i {
    color: var(--color-success);
}

.custom-alert-icon-circle.warning {
    border-color: var(--color-warning);
}

.custom-alert-icon-circle.error {
    border-color: var(--color-danger);
}

.custom-alert-icon-circle.success {
    border-color: var(--color-success);
}

/* Title */
.custom-alert-title {
    font-size: 28px;
    font-weight: 900;
    color: var(--color-text-primary);
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

/* Message */
.custom-alert-message {
    font-size: 15px;
    color: var(--color-text-secondary);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 32px;
}

/* Image/Illustration */
.custom-alert-image {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

.custom-alert-image img {
    max-width: 280px;
    height: auto;
    opacity: 0.9;
}

/* HTML Content Container (QR Code, Images, Custom HTML) */
.custom-alert-html-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 24px 0;
    padding: 20px;
    background: var(--tint-neutral-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.custom-alert-html-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.custom-alert-html-content .qr-code {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.custom-alert-html-content .qr-code img {
    max-width: 200px;
    background: white;
    padding: 10px;
    border-radius: 8px;
}

.custom-alert-html-content .qr-code-label {
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

/* Illustration placeholder (when no image) */
.custom-alert-illustration {
    width: 280px;
    height: 200px;
    margin: 0 auto 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.illustration-registration {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--tint-primary-bg) 0%, transparent 70%);
    position: relative;
}

.illustration-registration::before,
.illustration-registration::after {
    content: '';
    position: absolute;
    background: var(--tint-primary-bg);
    border-radius: 50%;
}

.illustration-registration::before {
    width: 120px;
    height: 120px;
    bottom: 20%;
    right: 30%;
    animation: float 3s ease-in-out infinite;
}

.illustration-registration::after {
    width: 80px;
    height: 80px;
    top: 30%;
    left: 20%;
    animation: float 4s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Buttons Container */
.custom-alert-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.custom-alert-buttons.single {
    grid-template-columns: 1fr;
}

/* Buttons */
.custom-alert-btn {
    padding: 16px 32px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    letter-spacing: 0.5px;
}

.custom-alert-btn i {
    font-size: var(--icon-md);
}

/* Cancel Button */
.custom-alert-btn-cancel {
    background: transparent;
    border: 2px solid var(--color-border-strong);
    color: var(--color-text-secondary);
}

.custom-alert-btn-cancel:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-border-strong);
    color: var(--color-text-primary);
    transform: translateY(-2px);
}

/* Continue/Confirm Button */
.custom-alert-btn-confirm {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.custom-alert-btn-confirm:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

/* OK Button (for single button alerts) */
.custom-alert-btn-ok {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.custom-alert-btn-ok:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .custom-alert-modal {
        padding: 30px 24px;
        max-width: 90%;
    }

    .custom-alert-title {
        font-size: 22px;
    }

    .custom-alert-message {
        font-size: 14px;
    }

    .custom-alert-icon-circle {
        width: 60px;
        height: 60px;
    }

    .custom-alert-icon-circle i {
        font-size: 30px;
    }

    .custom-alert-buttons {
        grid-template-columns: 1fr;
    }
}
