body:has(dialog[open]) {
    overflow: hidden;
}

.ow-modal{
    max-width: min(calc(100% - 1.5rem), 640px);
    border-radius: 0.25rem;
}

.ow-modal::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

.ow-modal-header,
.ow-modal-footer {
    background-color: #f6f6f6;
    padding: 1rem 1.25rem;
}

.ow-modal-content {
    padding: 1.5rem 1.25rem;
}

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

.ow-modal-title {
    margin: 0;
    font-size: 1.25rem;
}

.ow-modal-close {
    appearance: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 1rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ow-modal-close:hover {
    color: #374151;
}

.ow-modal-footer {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    column-gap: .625rem;
    row-gap: 1rem;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 474px) {
    .ow-modal {
        max-width: calc(100% - 1.5rem);
    }

    .ow-modal-footer {
        flex-direction: column;
    }

    .ow-modal-footer button {
        width: 100%;
    }
}
