/* Custom Modal System - without Bootstrap */

.custom_modal_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom_modal_overlay.show {
    opacity: 1;
}

.custom_modal {
    background: var(--color-bg);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    min-width: 600px;
    max-width: 900px;
    padding: 0;
    animation: modalFadeIn 0.3s ease;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.custom_modal_xl {
    max-width: 900px;
}

.custom_modal_fullscreen {
    max-width: 95vw;
    max-height: 95vh;
}

.custom_modal_header {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom_modal_title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

.custom_modal_close {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: var(--color-text-lighter);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.custom_modal_close:hover {
    color: var(--color-text);
}

.custom_modal_body {
    padding: 1rem;
    overflow: auto;
    flex: 1;
}

.custom_modal_footer {
    padding: 1rem 2rem 2rem;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
