/**
 * CSS for the Modal Component
 */

.modal {
    align-items: center;
    background-color: rgba(0, 0, 0, 0.6); /* Black w/ opacity */
    display: none; /* Hidden by default */
    height: 100%;
    justify-content: center;
    left: 0;
    overflow: auto;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.modal-overlay {
    cursor: pointer;
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

.modal-content {
    animation: animatetop 0.4s;
    background-color: var(--card-background-color);
    border: var(--card-border-width) solid var(--card-border-color);
    border-radius: var(--card-border-radius);
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    margin: auto;
    max-width: 400px;
    padding: 0;
    position: relative;
    width: 90%;
}

/* Add Animation */
@keyframes animatetop {
    from {
        opacity: 0;
        top: -300px;
    }
    to {
        opacity: 1;
        top: 0;
    }
}

.modal-header {
    align-items: center;
    border-bottom: 1px solid var(--muted-border-color);
    display: flex;
    justify-content: space-between;
    padding: var(--spacing) var(--block-spacing-horizontal);
}

.modal-header h2 {
    margin: 0;
}

.close-button {
    background: none;
    border: none;
    color: var(--muted-color);
    cursor: pointer;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    padding: 0;
}

.close-button:hover,
.close-button:focus {
    color: var(--primary);
    text-decoration: none;
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: var(--block-spacing-vertical) var(--block-spacing-horizontal);
}
