/* Custom Modal Styles matching Design System */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(31, 41, 55, 0.6); /* --text-charcoal with opacity */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    backdrop-filter: blur(2px);
}

.custom-modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.custom-modal-dialog {
    background-color: var(--bg-offwhite);
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    transform: scale(0.95);
    transition: transform 0.2s ease;
    overflow: hidden;
}

.custom-modal-overlay.is-visible .custom-modal-dialog {
    transform: scale(1);
}

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #E5E7EB;
}

.custom-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-charcoal);
}

.custom-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}

.custom-modal-close:hover {
    background-color: #F3F4F6;
    color: var(--text-charcoal);
}

.custom-modal-body {
    padding: 24px;
    color: var(--text-charcoal);
    font-size: 1rem;
    line-height: 1.5;
}

.custom-modal-body p {
    margin: 0;
}

.custom-modal-footer {
    padding: 16px 24px;
    background-color: #F9FAFB; /* Slightly off-white to distinguish footer */
    border-top: 1px solid #E5E7EB;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.custom-modal-btn {
    padding: 10px 20px;
    border-radius: var(--border-radius-base);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
    font-family: var(--font-primary);
}

.custom-modal-btn:active {
    transform: scale(0.98);
}

.custom-modal-btn-primary {
    background-color: var(--primary-action);
    color: white;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.2), 0 2px 4px -1px rgba(245, 158, 11, 0.1);
}

.custom-modal-btn-primary:hover {
    background-color: var(--primary-action-hover);
}

.custom-modal-btn-secondary {
    background-color: white;
    color: var(--text-charcoal);
    border: 1px solid #D1D5DB;
}

.custom-modal-btn-secondary:hover {
    background-color: #F3F4F6;
}
