/*
 * Visual recap forms: lists, action cards, module switches, preview notes.
 * Extends the workspace shell in portfolio-snapshot/snapshot.css; colours,
 * type and controls come from ffy-ui.css.
 */

.heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .1rem; }
.heading-actions .quiet-button { white-space: nowrap; }
.template-intro { margin: .65rem 0 0; color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.55; }

.privacy-box .switch-row + .switch-row { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid rgb(95 227 191 / 18%); }
.privacy-box input:disabled + *, .privacy-box input:disabled { opacity: .45; }

.field { display: block; margin: .75rem 0; }
.field em { margin-left: .25rem; color: var(--text-tertiary); font-size: var(--text-xs); font-style: normal; font-weight: 500; }
.field-grid .field { margin: .75rem 0 0; }

.section-note {
    margin: .25rem 0 .8rem;
    padding: .6rem .8rem;
    border-left: 2px solid var(--accent-mint);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: rgb(95 227 191 / 6%);
    color: var(--text-secondary);
    font-size: var(--text-xs);
    line-height: 1.5;
}

/* collections: list items, action cards, table rows */
.collection { margin: .8rem 0; }
.collection-label { margin: 0 0 .35rem; color: var(--text-secondary); font-size: var(--text-sm); font-weight: 600; }
.collection-label small { color: var(--text-tertiary); font-weight: 500; }

.item-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .5rem;
    margin: .45rem 0;
    padding: .35rem .45rem .35rem .7rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: rgb(255 255 255 / 2.5%);
}

.item-row > b { color: var(--accent-mint); font-size: var(--text-xs); font-weight: 700; letter-spacing: .04em; }
.item-row input:not([type="checkbox"]) { margin-top: 0 !important; min-height: 2.5rem !important; border-color: transparent !important; background: transparent !important; padding-inline: .35rem !important; }
.item-row input:not([type="checkbox"]):focus { border-color: var(--accent-mint) !important; background: var(--surface-sunken) !important; }

.item-card {
    margin: .6rem 0;
    padding: .75rem .8rem .55rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: rgb(255 255 255 / 2.5%);
}

.item-card > label { display: block; }
.item-card textarea { min-height: 3.6rem !important; }
.item-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-top: .55rem; align-items: end; }
.item-card-grid:first-child { margin-top: 0; }
.item-card-grid > * { min-width: 0; }
.item-card-grid .span-2 { grid-column: 1 / -1; }
.item-card-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .45rem; color: var(--text-tertiary); font-size: var(--text-xs); }

.item-actions { display: flex; gap: .15rem; min-width: max-content; }
.item-actions button {
    display: grid;
    place-items: center;
    min-width: 2.3rem;
    min-height: 2.3rem;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}

.item-actions button:hover:not(:disabled) { background: rgb(95 227 191 / 10%); color: var(--accent-mint); }
.item-actions button[data-remove]:hover:not(:disabled) { background: rgb(255 143 128 / 10%); color: var(--danger); }
.item-actions button:disabled { opacity: .25; cursor: default; }

.add-button { margin-top: .15rem; padding-left: .2rem; }
.add-button:disabled { opacity: .4; cursor: default; }

.check-field { display: flex !important; align-items: center; gap: .55rem; min-height: var(--control-h); color: var(--text-primary) !important; font-size: var(--text-sm); cursor: pointer; }

.module-toggles {
    display: grid;
    gap: .55rem;
    margin: 0 0 1rem;
    padding: .8rem .9rem;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: rgb(255 255 255 / 2%);
}

.module-toggles .design-label { margin: 0; }

/* preview states */
.preview-empty {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: min(80%, 24rem);
    margin: 0;
    padding: 1.1rem 1.3rem;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    background: rgb(6 12 14 / 88%);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.5;
    text-align: center;
}

.layout-warnings {
    position: absolute;
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    width: min(92%, 34rem);
    padding: .65rem .85rem;
    border: 1px solid rgb(242 184 91 / 45%);
    border-radius: var(--radius-md);
    background: rgb(34 27 12 / 92%);
    color: var(--warning);
    font-size: var(--text-xs);
    line-height: 1.5;
}

.layout-warnings p { margin: 0; }
.layout-warnings p + p { margin-top: .3rem; }

.export-status { min-height: 1.2rem; margin: .75rem 0 0; color: var(--accent-mint); font-size: var(--text-xs); }
.noscript { margin: 2rem; color: var(--warning); }

@media (max-width: 48rem) {
    .layout-warnings { position: static; transform: none; width: auto; margin: .75rem; }
    .preview-empty { position: static; transform: none; max-width: none; margin: .75rem; }
}

@media (max-width: 26rem) {
    .item-card-grid { grid-template-columns: 1fr; }
    .heading-actions { flex-direction: column; align-items: flex-end; }
}
