/*
 * The Forms module in the panel: a form's place in the editor (its title in
 * a dashed box), and one submission read in its window.
 */

:is(.jodit-wysiwyg, .jodit__preview-box) .entry-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
    padding: 1rem 1.25rem;
    border: 2px dashed var(--gray-300);
    border-radius: 0.5rem;
    color: var(--gray-600);
    font-weight: 600;
}

:is(.jodit-wysiwyg, .jodit__preview-box) .entry-form::before {
    content: '';
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    background: currentColor;
    /* heroicon clipboard-document-list */
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25ZM6.75 12h.008v.008H6.75V12Zm0 3h.008v.008H6.75V15Zm0 3h.008v.008H6.75V18Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='black'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25ZM6.75 12h.008v.008H6.75V12Zm0 3h.008v.008H6.75V15Zm0 3h.008v.008H6.75V18Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.dark :is(.jodit-wysiwyg, .jodit__preview-box) .entry-form {
    border-color: color-mix(in oklab, white 20%, transparent);
    color: var(--gray-300);
}

/* One submission: its sections apart; in each, a label over its answer. */
.cms-form-submission {
    display: grid;
    gap: 1.5rem;
}

.cms-form-submission-values {
    display: grid;
    gap: 1.25rem;
    margin: 0;
}

.cms-form-submission-row dt {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.cms-form-submission-row dd {
    margin: 0;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* A submission's files: one download per line. */
.cms-form-submission-files {
    display: grid;
    gap: 0.35rem;
}

.cms-form-submission-file {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary-600);
}

.dark .cms-form-submission-file {
    color: var(--primary-400);
}

.cms-form-submission-file:hover span:first-of-type {
    text-decoration: underline;
}

.cms-form-submission-file-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.cms-form-submission-file-size {
    color: var(--gray-500);
    font-size: 0.8125rem;
}
