/* custom-html.css — a raw HTML block an author pasted in.
 *
 * Yours: edit it, or delete the file.
 *
 * Whatever is inside is theirs and is left alone. These rules only stop it
 * breaking the page: an iframe that would be wider than the column, and a
 * fallback for when the block cannot be rendered.
 */

.velocity-html-block[data-preserved="true"] {
    position: relative;
}

.velocity-html-rendered {
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
}

.velocity-html-wrapper iframe,
.velocity-html-content iframe,
.velocity-html-rendered iframe {
    display: block;
    max-width: 100% !important;
}

.velocity-html-fallback {
    margin: 0.625rem 0;
    border: 1px dashed var(--line);
    border-radius: var(--radius-small);
    background: var(--paper-soft);
}

.velocity-html-placeholder {
    padding: 1rem;
    text-align: center;
    color: var(--ink-faint);
}

.velocity-html-placeholder p {
    margin: 0 0 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.velocity-html-placeholder small {
    font-size: 0.75rem;
    word-break: break-all;
}

/* The three widths the editor offers, as a modifier on the rendered block. */
.velocity-html-rendered.velocity-html-small {
    width: 40%;
    margin-inline: auto;
}

.velocity-html-rendered.velocity-html-medium {
    width: 70%;
    margin-inline: auto;
}

.velocity-html-rendered.velocity-html-full {
    width: 100%;
}

/* The editor's own view of the block, dashed so it is obvious in a draft that
   this is a container and not the rendered result. It reaches the published
   page only when a block could not be rendered. */
.velocity-html-widget {
    position: relative;
    min-height: 60px;
    padding: 1rem;
    border: 2px dashed var(--line);
    border-radius: var(--radius);
    background: var(--paper-soft);
}

.velocity-html-widget-header {
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-faint);
}

.velocity-html-widget-content {
    word-break: break-word;
}

.velocity-html-widget-placeholder {
    font-size: 0.875rem;
    color: var(--ink-faint);
}

@media (max-width: 500px) {
    .velocity-html-rendered.velocity-html-small,
    .velocity-html-rendered.velocity-html-medium {
        width: 100%;
    }
}
