/* ============================================================
   oficina_smart.css — OFICINA SMART v1.0
   Sigue el design system de Allucho (variables CSS, sin shadows)
   ============================================================ */

/* ── Grid de generaciones ───────────────────────────────────── */
.os-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

/* ── Tarjeta de Generación ──────────────────────────────────── */
.os-gen-card {
  transition: border-color .15s;
}
.os-gen-card:hover {
  border-color: var(--accent);
}

/* ── Iconos de accion compactos (no son botones de texto) ───── */
.os-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: background .12s, border-color .12s;
  flex: none;
  padding: 0;
}
.os-icon-btn svg {
  width: 14px;
  height: 14px;
}
.os-icon-btn:hover {
  background: var(--surface2);
  border-color: var(--accent);
}
.os-icon-btn:active {
  background: var(--surface2);
}

/* ── Tarjeta de Bloque ──────────────────────────────────────── */
.os-block-card {
  transition: border-color .15s;
}
.os-block-card:hover {
  border-color: var(--border);
}

/* ── Showroom público ───────────────────────────────────────── */
.os-showroom-root {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font, 'Inter', system-ui, sans-serif);
}

/* Header del Showroom */
.os-show-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface1);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.os-show-header-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}
.os-show-header-title {
  font-weight: 700;
  font-size: 15px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}
.os-show-header-status {
  flex: none;
}

/* Contenido principal del Showroom */
.os-show-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* Cada bloque en el Showroom */
.os-show-block {
  margin-bottom: 28px;
}
.os-show-block-inner {
  background: var(--surface1);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
}

/* Cabecera del bloque */
.os-show-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.os-show-block-title {
  font-weight: 700;
  font-size: 15px;
}
.os-show-block-body {
  padding: 20px 18px;
}

/* Bloque imagen */
.os-show-img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
  border-radius: 0;
}
.os-show-img-caption {
  padding: 10px 18px;
  font-size: 13px;
  color: var(--text-2);
  border-top: 1px solid var(--border);
}

/* Bloque galería */
.os-show-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  padding: 18px;
}
.os-show-gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-sm, 8px);
  cursor: zoom-in;
  transition: opacity .15s;
  border: 1px solid var(--border);
}
.os-show-gallery img:hover { opacity: .88; }

/* Bloque texto */
.os-show-text {
  line-height: 1.65;
  font-size: 14px;
  white-space: pre-wrap;
}

/* Bloque presupuesto */
.os-show-budget-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.os-show-budget-table th {
  background: var(--surface2);
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
.os-show-budget-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.os-show-budget-table tr:last-child td { border-bottom: none; }
.os-show-budget-total {
  display: flex;
  justify-content: flex-end;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 15px;
  border-top: 1px solid var(--border);
}

/* Bloque PDF */
.os-show-pdf-embed {
  width: 100%;
  height: 540px;
  border: none;
  display: block;
}

/* Bloque video */
.os-show-video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}
.os-show-video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* Bloque 3D */
.os-show-3d {
  display: block;
  width: 100%;
  height: 400px;
  background: var(--surface2);
}

/* Bloque separador */
.os-show-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.os-show-separator::before,
.os-show-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Botones de acción flotantes del Showroom ───────────────── */
.os-show-actions {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 80;
  background: var(--surface1);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: 8px 14px;
  box-shadow: none; /* sin shadows — el borde hace el trabajo */
}
.os-show-actions .btn {
  border-radius: 99px;
  font-size: 13px;
  padding: 8px 18px;
}

/* ── Panel de feedback por bloque ───────────────────────────── */
.os-show-feedback-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.os-show-feedback-bar.approved {
  background: var(--success-soft);
}
.os-show-feedback-bar.mejora {
  background: var(--premium-soft);
}
.os-show-feedback-label {
  font-size: 12px;
  font-weight: 600;
  flex: 1;
}

/* ── Estado "inactivo" del Showroom ─────────────────────────── */
.os-show-inactive {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  background: var(--bg);
}
.os-show-inactive-logo {
  height: 40px;
  margin-bottom: 24px;
  opacity: .6;
}
.os-show-inactive h2 {
  margin-bottom: 8px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .os-grid {
    grid-template-columns: 1fr;
  }
  .os-show-content {
    padding: 20px 14px 100px;
  }
  .os-show-header {
    padding: 10px 14px;
  }
  .os-show-3d {
    height: 280px;
  }
  .os-show-pdf-embed {
    height: 380px;
  }
  .os-show-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  .os-show-actions {
    bottom: 16px;
    padding: 6px 10px;
    gap: 6px;
  }
  .os-show-actions .btn {
    padding: 7px 14px;
    font-size: 12px;
  }
}
