/**
 * Component: Replicable Modal System
 *
 * Styles for the robust, accessible modal component.
 */

.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Default Hidden State */
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal-container.is-open {
    /* Active Visible State */
    pointer-events: auto;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

.modal-panel {
    position: relative;
    z-index: 1001;
    background-color: var(--background-color);
    padding: var(--space-xl);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-close-btn {
    position: absolute;
    top: var(--space-md);
    right: var(--space-lg);
    font-size: 2rem;
    line-height: 1;
    background: none;
    border: none;
    color: var(--color-silver-500);
    cursor: pointer;
}

.modal-content h2 {
    margin-top: 0;
}