/* CSS vanilla: palette, font e sezioni dello Studio. */
.social-shell, .social-shell * { box-sizing: border-box; }
.social-shell { color: var(--text); font: inherit; min-width: 0; margin-top: 12px; }
.social-shell .cc-head { margin-bottom: 0; }
.social-shell button, .social-shell a { -webkit-tap-highlight-color: transparent; }
.social-shell button { font-family: inherit; cursor: pointer; }
.social-shell :is(button, a, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.social-shell p { line-height: 1.6; }
.social-intro { margin: 10px 0 18px; color: var(--text-muted); font-size: 13px; }
.social-grid.content-preset-grid { grid-template-columns: repeat(auto-fill, minmax(min(165px, 100%), 1fr)); gap: 12px; }
.social-card { display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-input); color: var(--text); transition: border-color .18s, transform .18s; min-width: 0; }
.social-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.social-preview { display: block; position: relative; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; background: var(--bg-soft); }
.social-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; color: var(--text-muted); font-size: 12px; }
.social-placeholder .icon { width: 28px; height: 28px; }
.social-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.social-duration { position: absolute; right: 9px; bottom: 9px; background: #101018dc; color: #fff; padding: 4px 8px; border: 1px solid #ffffff24; border-radius: 7px; font-size: 11px; font-variant-numeric: tabular-nums; }
.social-card-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 10px; padding: 13px; width: 100%; }
.social-badge { display: inline-flex; align-items: center; font-size: 10px; font-weight: 600; border: 1px solid var(--border-soft); border-radius: 999px; padding: 4px 8px; color: var(--text-muted); background: var(--bg-soft); }
.social-approved { color: #a4d5bb; }
.social-card-title { font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.social-cost { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 5px 7px; border: 1px solid var(--border-soft); border-radius: 9px; color: #a4d5bb; background: var(--bg-soft); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.social-usd { border-radius: 999px; background: #ffffff09; padding: 2px 5px; color: var(--text-muted); }
.social-card-link { display: flex; justify-content: space-between; width: 100%; margin-top: auto; padding-top: 3px; font-size: 11px; color: var(--text-muted); }
.social-card-link span { color: var(--text); }
.social-detail.preset-form { gap: 16px; }
.social-back { align-self: flex-start; padding: 9px 0; background: transparent; border: 0; color: var(--text-muted); font-size: 12px; min-height: 40px; }
.social-back:hover { color: var(--text); }
.social-title { line-height: 1.5; overflow-wrap: anywhere; }
.social-detail .social-intro { margin: 0; }
.social-pilot { color: var(--text); font-size: 12px; text-underline-offset: 4px; overflow-wrap: anywhere; }
.social-block { border-top: 1px solid var(--border); padding-top: 18px; }
.social-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.social-row h4 { margin: 0; font-size: 13px; }
.social-muted { color: var(--text-muted); font-size: 12px; }
.social-legend { display: flex; flex-wrap: wrap; gap: 9px 16px; margin: 14px 0; color: var(--text-muted); font-size: 11px; }
.social-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.social-dot { display: inline-block; flex: 0 0 8px; width: 8px; height: 8px; border-radius: 3px; }
.social-generated { background: var(--accent); color: #fff; }
.social-original { background: #39867b; color: #fff; }
.social-timeline { display: flex; gap: 3px; height: 40px; border-radius: 8px; overflow: hidden; }
.social-segment { display: flex; flex-basis: 0; min-width: 0; align-items: center; justify-content: center; overflow: hidden; font-size: 11px; font-weight: 700; }
.social-scale { margin-top: 7px; color: var(--text-muted); font-size: 10px; }
.social-scene-key { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.social-scene-key li { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 11px; }
.social-scene-key time { margin-left: auto; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.social-copy { border-top: 1px solid var(--border); padding-top: 12px; font-size: 12px; }
.social-copy summary { cursor: pointer; padding: 5px 0; font-weight: 600; }
.social-copy summary span { margin-left: 6px; color: var(--text-muted); font-weight: 400; }
.social-lines { list-style: none; padding: 0; margin: 12px 0 0; }
.social-lines li { display: grid; grid-template-columns: 85px minmax(0, 1fr); gap: 12px; padding: 10px 0; line-height: 1.6; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.social-lines time { color: var(--text-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.social-lines small { display: block; color: var(--text-muted); margin-bottom: 3px; }
.social-note { background: var(--bg-soft); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 8px; padding: 12px; font-size: 12px; }
.social-note p { margin: 5px 0 0; color: var(--text-muted); overflow-wrap: anywhere; }
.social-actions { display: grid; gap: 15px; min-width: 0; }
.social-estimate { padding-top: 15px; border-top: 1px solid var(--border); font-size: 12px; }
.social-estimate p { margin-bottom: 0; font-size: 11px; }
.social-generate { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 10px; min-height: 46px; padding: 12px; font-size: 13px; font-weight: 600; }
.social-generate:hover { background: var(--accent-hover); }
.social-generate span { font-size: 11px; font-weight: 400; }
.social-generate:disabled { opacity: .6; cursor: wait; }
.social-progress { border: 1px solid var(--border-soft); border-radius: 12px; padding: 14px; background: var(--bg-input); font-size: 12px; }
.social-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; margin: 0 0 20px; padding: 0; }
.social-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; color: var(--text-muted); font-size: 10px; text-align: center; overflow-wrap: anywhere; }
.social-steps li::before { content: ''; position: absolute; height: 1px; background: var(--border-soft); width: 100%; top: 13px; left: -50%; }
.social-steps li:first-child::before { display: none; }
.social-steps li > span { position: relative; display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--border-soft); border-radius: 50%; background: var(--bg-input); }
.social-steps .social-current { color: var(--text); }
.social-steps .social-current > span { background: var(--accent); border-color: var(--accent); color: #fff; }
.social-steps .social-done > span { color: #a4d5bb; border-color: #39867b; }
.social-job-scenes { list-style: none; padding: 0; margin: 12px 0; }
.social-job-scenes li { border-top: 1px solid var(--border); padding: 12px 0; }
.social-job-scenes small { color: var(--text-muted); font-size: 10px; }
.social-job-scenes .social-row > span small { display: block; margin-top: 3px; }
.social-job-scenes strong { font-size: 11px; }
.social-meter { width: 100%; height: 5px; display: block; margin: 10px 0; accent-color: var(--accent); border: 0; border-radius: 8px; overflow: hidden; background: var(--bg-soft); }
.social-meter::-webkit-progress-bar { background: var(--bg-soft); }
.social-meter::-webkit-progress-value { background: var(--accent); }
.social-meter::-moz-progress-bar { background: var(--accent); }
.social-error-text { color: #f3a4aa; overflow-wrap: anywhere; }
.social-failed { border-color: var(--danger); }
.social-progress p { overflow-wrap: anywhere; }
@media (max-width: 420px) {
  .social-shell.cc-section, .social-detail.preset-form { padding: 12px; }
  .social-grid.content-preset-grid { grid-template-columns: minmax(0, 1fr); }
  .social-preview { aspect-ratio: 4 / 3; }
  .social-video { object-fit: contain; }
  .social-lines li { grid-template-columns: 65px minmax(0, 1fr); gap: 8px; }
  .social-progress { padding: 10px; }
  .social-steps li { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .social-card { transition: none; }
  .social-card:hover { transform: none; }
}
