/* text-metadata.css: the Deck Info popup (see MetadataPopup), for a slide deck's directives */

div.popup-text-metadata {
    max-height: 85%;
    overflow-y: auto;
    overscroll-behavior: contain;
    /* So the 85% includes the popup's padding and border */
    box-sizing: border-box;
}

div.text-metadata-heading {
    text-align: center;
    margin-bottom: 24px;
}

/* One grid for all three sections, so their second columns line up: labels in the first column,
   then the text fields, images and checkboxes in the second */
div.text-metadata-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    align-items: center;
    column-gap: 16px;
    row-gap: 8px;
}

/* Across both columns */
div.text-metadata-subheading {
    grid-column: 1 / -1;
    text-align: center;
    font-weight: bold;
    margin-top: 12px;
    margin-bottom: 4px;
}

div.text-metadata-subheading:first-child {
    margin-top: 0;
}

/* As FeedbackPopup's text area */
input.text-metadata-input {
    padding: 8px;
    font-family: "Open Sans", "IBM Plex Sans", sans-serif;
    font-weight: normal;
    background-color: white;
    min-width: 0;
}

/* Blank until an image is shown, which keeps its own aspect ratio within these bounds */
div.text-metadata-image {
    justify-self: start;
    width: 160px;
    height: 100px;
    border: 2px solid darkgray;
    border-radius: 4px;
    background-color: white;
    box-sizing: border-box;
    cursor: pointer;
}

div.text-metadata-image:hover {
    border-color: navy;
}

div.text-metadata-image.text-metadata-logo {
    width: 80px;
    height: 80px;
}

/* Fitted to the image instead, at its own aspect ratio, within the blank box's bounds */
div.text-metadata-image.text-metadata-filled {
    width: auto;
    height: auto;
}

img.text-metadata-sample {
    display: block;
    max-width: 156px;
    max-height: 96px;
}

div.text-metadata-logo img.text-metadata-sample {
    max-width: 76px;
    max-height: 76px;
}

div.text-metadata-check {
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Without the browser's own margin, so the box lines up with the fields above */
div.text-metadata-check input {
    margin-left: 0;
}

/* A radio button with its name, in the label column, lined up with the labels above */
label.text-metadata-bg-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

label.text-metadata-bg-option input {
    margin-left: 0;
}

/* Filled with the chosen colour, with its name on it (see MetadataPopup.showBackground), or blank,
   asking for one */
button.text-metadata-bg-color {
    justify-self: start;
    min-width: 160px;
    padding: 8px 12px;
    border: 2px solid darkgray;
    border-radius: 4px;
    background-color: white;
    color: black;
    font-family: "Open Sans", "IBM Plex Sans", sans-serif;
    text-align: left;
    cursor: pointer;
}

button.text-metadata-bg-color:hover {
    border-color: navy;
}

button.text-metadata-bg-color.text-metadata-bg-dark {
    color: white;
}
