/* Custom Modal Styles (Separate File) */
.container {
    overflow: visible !important;
}

.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Dimmed background */
    backdrop-filter: blur(4px);
    z-index: 200000 !important;
    /* Extremely high z-index */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    /* Ensure no phantom clicks */
}

.custom-modal-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
}

.custom-modal {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow:
        0 10px 40px -10px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    z-index: 200001 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.custom-modal-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.custom-modal-overlay.active .custom-modal {
    transform: scale(1);
}

html.dark-mode .custom-modal {
    background: rgba(30, 41, 59, 0.9);
    /* Dark blue/slate base */
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.custom-modal-icon {
    width: 60px;
    height: 60px;
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

html.dark-mode .custom-modal-icon {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.custom-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.custom-modal-message {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.custom-modal-actions {
    display: flex;
    gap: 12px;
    width: 100%;
}

.btn-modal-cancel,
.btn-modal-confirm {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: inherit;
    font-size: 0.95rem;
}

.btn-modal-cancel {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-modal-cancel:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.btn-modal-confirm {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.btn-modal-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.4);
}