/* MVTLoop authoring: brand preset, secondary/tertiary colours and custom fonts (study-brand-editor.js). */
.study-brand-extras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; margin: 12px 0 4px; align-items: start; }
.study-brand-extras:empty { display: none; }
.study-brand-extras .setup-field { display: grid; gap: 6px; }
.study-brand-extras .hint-inline { font-weight: 400; color: var(--ink-muted, #566176); font-size: .85em; }
.study-brand-preset .hint { margin: 0; }
.study-brand-hex { width: 9ch; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }
.study-brand-hex.is-invalid { border-color: var(--danger, #c62839); }
.study-brand-hex::placeholder { text-transform: none; }
.study-brand-colour .brand-color-control { flex-wrap: nowrap; }
.study-brand-colour [data-brand-auto][hidden] { display: none; }
.study-brand-warnings { grid-column: 1 / -1; margin: 0; list-style: disc; padding: 10px 12px 10px 30px; border-radius: 10px; background: #fff8e6; border: 1px solid #f1d38a; color: #6b4b00; font-size: .85rem; display: grid; gap: 4px; }
.study-brand-warnings[hidden] { display: none; }
.study-font-extras { grid-column: 1 / -1; }
.study-font-custom { display: grid; gap: 10px; padding: 12px; border-radius: 12px; background: var(--canvas, #f7f8fb); border: 1px solid var(--border, #dde1ea); }
.study-font-custom[hidden] { display: none; }
.study-font-custom .setup-field { display: grid; gap: 6px; }
.study-font-custom .hint { margin: 0; }
.study-font-file { display: flex; gap: 8px; align-items: center; }
.study-font-file input[type="text"] { flex: 1; min-width: 0; }
.study-font-upload { position: relative; overflow: hidden; cursor: pointer; white-space: nowrap; }
.study-font-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.study-font-upload:focus-within { outline: 3px solid var(--ring, rgba(81,70,216,.35)); outline-offset: 2px; }

/* Live preview sample: primary button, secondary link, tertiary required marker. */
.study-brand-sample { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: .85rem; }
.study-brand-sample-q { font-weight: 600; }
.study-brand-sample-q b { color: var(--preview-tertiary, var(--preview-brand)); }
.study-brand-sample-link { color: var(--preview-secondary, var(--preview-brand)); text-decoration: underline; }
.study-brand-sample-btn { margin-left: auto; padding: 6px 16px; border-radius: 8px; background: var(--preview-brand); color: #fff; font-weight: 700; }
@media (max-width: 900px) { .study-brand-extras { grid-template-columns: 1fr; } }

/* Live preview of Square corner style in the welcome card */
[data-study-corners="square"], [data-study-corners="square"] * { border-radius: 0 !important; }
.study-brand-corners .hint { margin: 0; }

/* Keep the three-column brand grid tidy: long option text and hints must not spill into the next column. */
.study-brand-extras > .setup-field { min-width: 0; }
.study-brand-extras select { width: 100%; min-width: 0; max-width: 100%; text-overflow: ellipsis; }
.study-brand-extras .hint { overflow-wrap: anywhere; }
@media (max-width: 900px) { .study-brand-extras { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .study-brand-extras { grid-template-columns: minmax(0, 1fr); } }
