/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Books Phase 6.1 — rewrite workspace readable diffs */
.sr-diff-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}
.sr-diff-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.sr-diff-swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.15);
}
.sr-diff-swatch-add { background: #c7e9d3; }
.sr-diff-swatch-del { background: #f5c2c7; }
.sr-diff-swatch-eq { background: #f1f3f5; }
.sr-diff-panel {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  max-height: 55vh;
  overflow: auto;
  background: #fff;
}
.sr-diff-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #eee;
  align-items: flex-start;
}
.sr-diff-row:last-child { border-bottom: 0; }
.sr-diff-mark {
  flex: 0 0 1.1rem;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.45;
  user-select: none;
}
.sr-diff-body {
  flex: 1 1 auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.5;
  font-size: 0.95rem;
}
.sr-diff-eq {
  background: #f8f9fa;
  color: #495057;
}
.sr-diff-eq .sr-diff-mark { color: #adb5bd; }
.sr-diff-add {
  background: #d1e7dd;
  border-left: 4px solid #198754;
}
.sr-diff-add .sr-diff-mark { color: #0f5132; }
.sr-diff-del {
  background: #f8d7da;
  border-left: 4px solid #dc3545;
}
.sr-diff-del .sr-diff-mark { color: #842029; }
.sr-diff-change {
  background: #fff3cd;
  border-left: 4px solid #ffc107;
}
.sr-diff-change .sr-diff-mark { color: #664d03; }
.sr-diff-inline-add {
  background: #a3cfbb;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 0.1em;
  border-radius: 2px;
}
.sr-diff-inline-del {
  background: #f1aeb5;
  text-decoration: line-through;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  padding: 0 0.1em;
  border-radius: 2px;
}
.sr-status-banner {
  border-width: 2px;
  font-size: 1.05rem;
}
.sr-status-banner .sr-status-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.sr-candidate-panel {
  border: 2px solid #198754;
  border-radius: 0.5rem;
  background: #f0faf4;
}
.sr-candidate-panel .sr-candidate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* SOCIAL Phase 21 — Studio scene editor */
.social-studio {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: calc(100vh - 8rem);
}
.social-studio-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.social-studio-main {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 0.75rem;
  min-height: 280px;
}
.social-studio-preview {
  background: #111;
  color: #ddd;
  border-radius: 0.375rem;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.social-studio-preview img,
.social-studio-preview video {
  max-width: 100%;
  max-height: 360px;
}
.social-studio-placeholder {
  text-align: center;
  padding: 1.5rem;
  color: #adb5bd;
}
.social-studio-timeline-wrap {
  overflow-x: auto;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background: #f8f9fa;
  padding: 0.5rem;
}
.social-studio-timeline {
  display: flex;
  gap: 0.5rem;
  min-height: 92px;
}
.social-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #e9ecef;
  color: #495057;
  font-size: 0.7rem;
  line-height: 1;
  vertical-align: text-top;
  cursor: help;
}
.social-help-icon:focus {
  outline: 2px solid #0d6efd;
  outline-offset: 1px;
}
.social-studio-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.social-studio-preview-header {
  color: #212529;
}
.social-studio-block {
  flex: 0 0 auto;
  width: 148px;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  background: #fff;
  padding: 0.4rem 0.45rem;
  cursor: grab;
  text-decoration: none;
  color: inherit;
}
.social-studio-block-thumb {
  height: 64px;
  border-radius: 0.25rem;
  background: #212529;
  color: #adb5bd;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 0.35rem;
}
.social-studio-block-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.social-studio-block-icon { font-size: 0.7rem; letter-spacing: 0.04em; }
.social-studio-spinner {
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid #0dcaf0;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: social-studio-spin 0.8s linear infinite;
}
@keyframes social-studio-spin { to { transform: rotate(360deg); } }
.social-studio-take.is-selected {
  background: #f0f8ff;
  border-color: #0d6efd;
  box-shadow: inset 3px 0 0 #0d6efd;
  padding-left: 0.45rem;
}
.social-studio-take-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 0.25rem;
  background: #111;
}
.social-studio-advanced {
  border: 1px dashed #ced4da;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  background: #f8f9fa;
}
.social-studio-advanced summary,
.social-studio-failure-tech summary { cursor: pointer; }
.social-studio-section h6 { font-size: 0.9rem; }
.social-studio-block:hover { border-color: #0d6efd; }
.social-studio-block.is-selected {
  border-color: #0d6efd;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}
.social-studio-block.is-dragging { opacity: 0.45; }
.social-studio-block.is-drop-target { outline: 2px dashed #0d6efd; }
.social-studio-inspector {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background: #fff;
}
.social-studio-media {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background: #fff;
  max-height: 360px;
  overflow: auto;
}
.social-studio-take {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  border-bottom: 1px solid #eee;
  padding: 0.4rem 0;
}
.social-studio-take:last-child { border-bottom: 0; }
.social-studio-failure {
  border: 1px solid #f1aeb5;
  background: #fff5f5;
  border-radius: 0.375rem;
  padding: 0.6rem 0.75rem;
  margin: 0.4rem 0 0.75rem;
}
.social-studio-failure-dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.15rem 0.75rem;
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
}
.social-studio-failure-dl dt { color: #6c757d; font-weight: 600; }
.social-studio-failure-dl dd { margin: 0; }
.social-studio-failure-tech { font-size: 0.8rem; margin-top: 0.4rem; }
.social-studio-failure-tech summary { cursor: pointer; }
@media (max-width: 992px) {
  .social-studio-main { grid-template-columns: 1fr; }
}

/* Social channel A1/A2 — simple editor + production workspace */
.social-channel-simple-tabs .card { border-color: #dee2e6; }
.social-channel-type-card {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.social-channel-type-card:hover {
  border-color: #adb5bd;
  box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.04);
}
.social-channel-type-card.border-primary {
  box-shadow: 0 0 0 0.1rem rgba(13,110,253,0.15);
}
.social-channel-production-card {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.social-channel-production-thumb {
  aspect-ratio: 16 / 9;
  background: #f1f3f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.social-channel-production-thumb video,
.social-channel-production-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.social-channel-production-placeholder {
  color: #868e96;
  font-size: 0.8rem;
}
.social-channel-production-body {
  padding: 0.75rem 0.85rem 0.9rem;
}
.social-channel-identity .badge { vertical-align: middle; }

/* Gallery Production — reusable ⓘ field help */
.gallery-help-label {
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
}
.gallery-field-help {
  position: relative;
  display: inline;
  vertical-align: baseline;
}
.gallery-field-help-btn {
  display: inline;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #868e96;
  font-size: 0.72em;
  font-weight: 400;
  line-height: 1;
  vertical-align: baseline;
  cursor: help;
  opacity: 0.7;
}
.gallery-field-help-btn:hover,
.gallery-field-help-btn:focus {
  color: #0d6efd;
  opacity: 1;
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: 1px dotted currentColor;
  outline-offset: 2px;
}
.gallery-field-help-tip {
  position: absolute;
  z-index: 1080;
  top: calc(100% + 0.35rem);
  left: 0;
  width: min(18rem, 70vw);
  padding: 0.55rem 0.7rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background: #fff;
  color: #212529;
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.35;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.12);
  white-space: normal;
  text-align: left;
}
.gallery-field-help-tip[hidden] { display: none !important; }
