/* ═══════════════════════════════════════════════════════════════════════════
   Infographic Studio — picker sheet, progress, preview and the viewer.
   Shares the hwh-overlay tokens (--h-*) from homework-hub.css.
   ═══════════════════════════════════════════════════════════════════════════ */

.igs-sheet { max-width: 900px; }
.igs-body { gap: 18px; }
.igs-opt { font-weight: 600; text-transform: none; letter-spacing: 0; opacity: 0.7; margin-inline-start: 4px; }

/* ── style gallery ──────────────────────────────────────────────────────── */
.igs-styles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
}

.igs-style {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    border: 2px solid var(--h-border);
    border-radius: 16px;
    background: var(--h-surface);
    color: var(--h-text);
    text-align: start;
    cursor: pointer;
    font: inherit;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.igs-style:hover { transform: translateY(-2px); border-color: color-mix(in srgb, #ec4899 45%, transparent); }
.igs-style.is-picked { border-color: #ec4899; box-shadow: 0 0 0 3px color-mix(in srgb, #ec4899 22%, transparent); }

.igs-swatch {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 78px;
    border-radius: 11px;
    font-size: 1.5rem;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.igs-swatch i { position: relative; z-index: 1; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18)); }

/* three little "text lines" so every swatch hints at a layout */
.igs-swatch b {
    position: absolute;
    left: 12px;
    height: 4px;
    border-radius: 2px;
    background: currentColor;
    opacity: 0.35;
}

.igs-swatch b:nth-of-type(1) { bottom: 22px; width: 42%; }
.igs-swatch b:nth-of-type(2) { bottom: 14px; width: 60%; }
.igs-swatch b:nth-of-type(3) { bottom: 6px; width: 30%; }
.igs-swatch--portrait::after { content: ''; position: absolute; inset: 10px auto 10px 60%; width: 24%; border: 1.5px dashed currentColor; border-radius: 4px; opacity: 0.35; }
.igs-swatch--landscape::after { content: ''; position: absolute; inset: 10px 10px auto 58%; height: 26px; border: 1.5px dashed currentColor; border-radius: 4px; opacity: 0.35; }
.igs-swatch--square::after { content: ''; position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border: 1.5px dashed currentColor; border-radius: 4px; opacity: 0.35; }

.igs-style-name { font-size: 0.86rem; font-weight: 800; line-height: 1.2; }
.igs-style-desc { font-size: 0.7rem; line-height: 1.3; color: var(--h-muted); }

/* ── options ────────────────────────────────────────────────────────────── */
.igs-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .igs-row { grid-template-columns: 1fr; } }

.igs-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.igs-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--h-border);
    border-radius: 999px;
    background: var(--h-surface);
    color: var(--h-text);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.igs-chip i { font-size: 0.75rem; color: var(--h-muted); }
.igs-chip.is-on { border-color: #ec4899; background: color-mix(in srgb, #ec4899 12%, var(--h-surface)); }
.igs-chip.is-on i { color: #ec4899; }

.igs-input {
    width: 100%;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--h-border);
    border-radius: 12px;
    background: var(--h-surface);
    color: var(--h-text);
    font: inherit;
    font-size: 0.88rem;
}

.igs-input:focus { outline: none; border-color: #ec4899; box-shadow: 0 0 0 3px color-mix(in srgb, #ec4899 18%, transparent); }

/* ── progress ───────────────────────────────────────────────────────────── */
.igs-progress { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 28px 0 16px; text-align: center; }

.igs-progress-art {
    width: 96px;
    height: 96px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
    animation: igsBreathe 2.2s ease-in-out infinite;
}

@keyframes igsBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

.igs-steps { display: flex; flex-direction: column; gap: 10px; min-width: 260px; text-align: start; }

.igs-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--h-border);
    border-radius: 12px;
    background: var(--h-surface);
    color: var(--h-muted);
    font-weight: 700;
    font-size: 0.9rem;
}

.igs-step.is-on { color: var(--h-text); border-color: #ec4899; }
.igs-step.is-on i { color: #ec4899; }
.igs-step.is-done { color: var(--h-text); }
.igs-step.is-done i { color: var(--h-ok); }
.igs-progress-note { font-size: 0.8rem; color: var(--h-muted); }

/* ── preview ────────────────────────────────────────────────────────────── */
.igs-preview { display: flex; flex-direction: column; align-items: center; gap: 10px; }

.igs-preview img {
    max-width: 100%;
    max-height: min(62vh, calc(var(--app-vh, 100vh) - 220px));
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    background: #fff;
}

.igs-preview-meta { font-size: 0.82rem; font-weight: 700; color: var(--h-muted); }
.igs-preview-meta i { color: #ec4899; margin-inline-end: 4px; }

/* ── viewer (teacher + students) ────────────────────────────────────────── */
.igs-view {
    position: fixed;
    inset: 0;
    z-index: 1000002;
    display: flex;
    flex-direction: column;
    background: rgba(8, 12, 22, 0.86);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.18s ease;
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
    color: #eaf0f8;
}

.igs-view.show { opacity: 1; }

.igs-view-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.igs-view-title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.igs-view-title i { color: #f472b6; }
.igs-view-title small { font-weight: 600; font-size: 0.78rem; color: #aab4c5; }

.igs-vbtn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
}

.igs-vbtn:hover { background: rgba(255, 255, 255, 0.18); }
.igs-vclose { padding: 0 11px; }
.igs-vclose:hover { background: rgba(239, 68, 68, 0.6); }
@media (max-width: 560px) { .igs-vbtn span { display: none; } }

.igs-view-stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow: auto;
    cursor: zoom-out;
}

.igs-view-stage img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    background: #fff;
    cursor: default;
}
