dialog {
    margin: auto;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    color: white;
    box-shadow: 1px 1px 10px 10px rgba(0, 0, 0, 0.25);
    border-radius: 0.25em;
}

dialog .header {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 0.5em;
}

dialog .header h1 {
    font-size: 1.5rem;
    text-align: center;
}

dialog .header span.close {
    font-size: 2rem;
    margin-left: 0.5em;
    transition: all 0.1s ease-in-out;
}

dialog .header span.close:hover {
    transform: scale(1.2);
    transition: all 0.1s ease-in-out;
}

dialog .body form {
    padding: 0.5em;
    display: flex;
    flex-direction: column;
}

dialog .body form input[type="radio"],
dialog .body form input[type="checkbox"] {
   display: none;
}

dialog .body form label {
    padding: 0.75em;
    text-align: center;
}

dialog .body form input[type="radio"]:checked + label {
    background-color: rgba(255, 255, 255, 0.1);
}

dialog .body form input[type="url"] {
    background-color: #111;
    color: white;
    padding: 0.75em;
    border: 1px solid #333;
    margin-bottom: 1em;
    transition: all 0.25s ease-in-out;
}

dialog .body form input[type="url"]:focus {
    border: 1px solid #555;
    transition: all 0.25s ease-in-out;
}

dialog .body form button {
    background-color: transparent;
    color: white;
    padding: 0.75em;
    font-size: 1rem;
    transition: all 0.25s ease-in-out;
}

dialog .body form button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.25s ease-in-out;
}

dialog:not([open]) {
    pointer-events: none;
    opacity: 0;
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(3px);
}

/* var(--video-card-width) * 2 + var(--video-card-gap) * 3 */
@media (max-width: 51.5em) {
    dialog {
        margin: 0;
        width: 100%;
        height: 100%;
        min-width: 100%;
        min-height: 100%;
        border: none;
        background-color: rgba(0, 0, 0, 0.85);
    }
}

/* dialog-specific rules */

#close-video-dialog {
    max-width: 30em;
}

#close-video-dialog .body p {
    text-align: center;
    padding: 0.25em;
}

#close-video-dialog-title {
    background-color: #111;
    border: 1px solid #333;
    margin-bottom: 0.5em;
}