/* =========================
   FLOATING CHIPS SYSTEM
========================= */

/* Section label — color adaptable al contraste del canvas */
.sp-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--top-ui-color, var(--text-primary));
  opacity: 0.55;
  padding: 2px 4px;
  pointer-events: none;
}

/* Flecha en subpanel chips — visible y fuerte */
.sp-arrow {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  opacity: 0.75;
}

/* Action chip (solo label, sin value) */
.sp-action-chip {
  width: fit-content;
}

/* Avatar circle con inicial */
.sp-avatar-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
  cursor: default;
  margin-left: 2px;
}

/* New version pill */
.sp-new-version-pill {
  background: rgba(50,50,50,0.72);
  color: #fff;
  border-radius: 20px;
  font-size: 9px;
  padding: 2px 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  line-height: 1.4;
}
.sp-new-version-pill:hover {
  background: rgba(30,30,30,0.90);
}

/* Close session pill */
.sp-close-session-pill {
  background: rgba(50,50,50,0.72);
  color: #fff;
  border-radius: 20px;
  font-size: 9px;
  padding: 2px 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  line-height: 1.4;
}
.sp-close-session-pill:hover {
  background: rgba(30,30,30,0.90);
}



/* =========================
   TOGGLE DOT (on/off)
========================= */

.sp-toggle-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #373737;
  background: transparent;
  transition: background 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.sp-toggle-dot.sp-toggle-on {
  background: #373737;
  border-color: #373737;
}

/* =========================
   VIEW LEVEL — sin círculos
========================= */

.sp-level-val {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sp-level-btn {
  font-size: 16px;
  font-weight: 500;
  color: #373737;
  cursor: pointer;
  user-select: none;
  line-height: 1;
  transition: color 0.15s;
  opacity: 0.6;
}

.sp-level-btn:hover {
  opacity: 1;
}

.sp-level-num {
  font-size: 13px;
  font-weight: 600;
  color: #373737;
  min-width: 16px;
  text-align: center;
}

/* =========================
   COMMENTS
========================= */

/* Panel flotante de comments — misma estética que shape-dropdown */
.sp-comments-panel {
  min-width: 0;
  width: 300px;
  padding: 8px;
}

.sp-comments-textarea {
  width: 100%;
  min-height: 52px;
  max-height: 88px; /* ~4 líneas */
  resize: none;
  overflow-y: auto;
  background: rgba(255,255,255,0.08);
  border: none;
  border-radius: 10px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  outline: none;
  line-height: 1.5;
  box-sizing: border-box;
  caret-color: white;
}

.sp-comments-textarea::placeholder {
  color: rgba(255,255,255,0.30);
}

.sp-comments-textarea::-webkit-scrollbar { width: 3px; }
.sp-comments-textarea::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.20);
  border-radius: 3px;
}

/* =========================
   SUB-PANEL FLOTANTE
========================= */

.sp-subpanel {
  position: fixed;
  width: 260px;
  max-height: 70vh;
  background: var(--bg-panel-soft);
  border-radius: var(--radius-lg);
  box-shadow: 4px 4px 20px rgba(0,0,0,0.13);
  overflow-y: auto;
  z-index: 6100;
}

.sp-subpanel::-webkit-scrollbar { width: 3px; }
.sp-subpanel::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 3px;
}

.sp-subpanel-inner {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sp-subpanel-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
}

.sp-subpanel-placeholder {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.4;
  font-style: italic;
  text-align: center;
  padding: 24px 0;
}

/* =========================
   UNITS
========================= */

.units-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.unit-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 4px;
  background: white;
  border-radius: 50%;
}

.unit-row-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unit-row-range {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.unit-row-delete {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-secondary);
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.unit-row-delete:hover {
  color: var(--danger);
  background: rgba(214, 69, 69, 0.08);
}

.unit-empty {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  padding: 6px 0;
  opacity: 0.5;
}

.unit-add-form {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 8px;
  border-top: 1px solid var(--border-soft);
}

.unit-add-form input {
  background: white;
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  padding: 6px 10px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

.unit-add-form input::placeholder { color: var(--text-secondary); opacity: 0.5; }
.unit-add-form input:focus { border-color: var(--border-strong); }

.unit-add-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.unit-add-btn {
  width: 100%;
  padding: 8px;
  background: var(--ui-bg);
  border-radius: 50%;
  color: white;
  font-size: 11px;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
  margin-top: 2px;
}

.unit-add-btn:hover { background: var(--ui-bg-hover); }

/* =========================
   SUB-PANEL como shape-dropdown
   (Units, BgImage)
========================= */

.sp-subpanel-wrap {
  min-width: 220px;
  max-height: 60vh;
  overflow-y: auto;
}

.sp-subpanel-wrap::-webkit-scrollbar { width: 3px; }
.sp-subpanel-wrap::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 50%;
}

/* Títulos y texto dentro del shape-dropdown oscuro */
.sp-subpanel-wrap .sp-subpanel-inner {
  padding: 10px;
  gap: 4px;
}

.sp-subpanel-wrap .sp-subpanel-title {
  color: rgba(0,0,0,0.45);
  border-bottom-color: rgba(0,0,0,0.10);
  margin-bottom: 4px;
}

.sp-subpanel-wrap .sp-subpanel-placeholder {
  color: rgba(0,0,0,0.30);
}

/* Unit rows dentro del dropdown oscuro */
.sp-subpanel-wrap .unit-row {
  background: rgba(0,0,0,0.05);
}

.sp-subpanel-wrap .unit-row-name {
  color: rgba(0,0,0,0.75);
}

.sp-subpanel-wrap .unit-row-range {
  color: rgba(0,0,0,0.35);
}

.sp-subpanel-wrap .unit-row-delete {
  color: rgba(0,0,0,0.28);
}

.sp-subpanel-wrap .unit-row-delete:hover {
  color: #ef4444;
  background: rgba(239,68,68,0.12);
}

.sp-subpanel-wrap .unit-empty {
  color: rgba(0,0,0,0.30);
}

/* Form inputs oscuros */
.sp-subpanel-wrap .unit-add-form {
  border-top-color: rgba(0,0,0,0.10);
}

.sp-subpanel-wrap .unit-add-form input {
  background: rgba(0,0,0,0.05);
  border-color: rgba(0,0,0,0.10);
  color: rgba(0,0,0,0.75);
}

.sp-subpanel-wrap .unit-add-form input::placeholder {
  color: rgba(0,0,0,0.28);
  opacity: 1;
}

.sp-subpanel-wrap .unit-add-form input:focus {
  border-color: rgba(0,0,0,0.28);

}

/* =========================
   MINI CALENDAR (shape-dropdown)
========================= */

.sp-calendar {
  min-width: 210px;
  padding: 10px;
  user-select: none;
}

.sp-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 2px;
}

.sp-cal-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.03em;
}

.sp-cal-nav {
  font-size: 16px;
  color: rgba(255,255,255,0.50);
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.15s;
  line-height: 1;
}

.sp-cal-nav:hover {
  color: rgba(255,255,255,0.90);
}

.sp-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}

.sp-cal-weekdays span {
  font-size: 9px;
  font-weight: 600;
  color: rgba(255,255,255,0.30);
  text-align: center;
  padding: 2px 0;
  letter-spacing: 0.04em;
}

.sp-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.sp-cal-day {
  font-size: 11px;
  color: rgba(255,255,255,0.70);
  text-align: center;
  padding: 5px 2px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.sp-cal-day:hover {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.90);
  border-radius: 999px;
}

.sp-cal-day.sp-cal-selected {
  background: rgba(255,255,255,0.90);
  color: #1a1a1a;
  font-weight: 600;
  border-radius: 999px;

}

/* =========================
   UNITS COMPACTO
========================= */

.sp-units-inner {
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 270px;
}

/* El contenedor oscuro (shape-dropdown) no debe imponer min-width propio */
.shape-dropdown:has(.sp-units-inner) {
  min-width: 0;
}

/* Cabezal */
.sp-units-header {
  display: grid;
  grid-template-columns: minmax(0,1fr) 28px 10px 28px 78px 16px;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  margin-bottom: 2px;
}

.sp-units-col-name {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

.sp-units-col-px {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  text-align: center;
}

.sp-units-dash-hdr {
  font-size: 9px;
  color: rgba(255,255,255,0.20);
  text-align: center;
}

.sp-units-col-fmt {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  text-align: right;
  padding-right: 5px;
}

.sp-units-col-del { width: 16px; }

/* Fila de unidad */
.sp-unit-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 28px 10px 28px 78px 16px;
  align-items: center;
  gap: 4px;
  padding: 3px 4px;
  border-radius: 999px;
  transition: background 0.12s;
  cursor: default;
}

.sp-unit-row:hover {
  background: rgba(255,255,255,0.05);
}

.sp-unit-row:focus-within {
  background: rgba(255,255,255,0.08);
}

.sp-unit-name {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  outline: none;
  border-radius: 3px;
  padding: 1px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-unit-name:focus {
  color: white;
  background: rgba(255,255,255,0.10);
}

.sp-unit-sep { display: none; }

.sp-unit-px {
  font-size: 11px;
  color: rgba(255,255,255,0.50);
  text-align: center;
  outline: none;
  border-radius: 3px;
  padding: 1px 2px;
}

.sp-unit-px:focus {
  color: white;
  background: rgba(255,255,255,0.10);
}

.sp-unit-dash {
  font-size: 10px;
  color: rgba(255,255,255,0.25);
  text-align: center;
}

.sp-unit-del {
  font-size: 9px;
  color: rgba(255,255,255,0.25);
  cursor: pointer;
  text-align: center;
  border-radius: 3px;
  transition: color 0.12s;
}

.sp-unit-del:hover {
  color: #ef4444;
}

/* Selector de formato de número */
.sp-unit-fmt {
  font-size: 10px;
  font-family: 'Courier New', monospace;
  color: rgba(255,255,255,0.55);
  text-align: right;
  cursor: pointer;
  border-radius: 4px;
  padding: 1px 5px;
  transition: color 0.12s, background 0.12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-unit-fmt:hover {
  color: white;
  background: rgba(255,255,255,0.10);
}

.sp-unit-fmt-dd {
  position: fixed;
  z-index: 99999999;
  background: rgba(28,28,34,0.99);
  border-radius: 8px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.45);
  padding: 4px;
  display: flex;
  flex-direction: column;
  min-width: 190px;
}

.sp-unit-fmt-opt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  color: rgba(255,255,255,0.80);
  padding: 5px 9px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
}

.sp-unit-fmt-opt:hover {
  background: rgba(255,255,255,0.08);
}

.sp-unit-fmt-opt.active {
  color: #7eb8ff;
}

.sp-unit-fmt-sample {
  font-family: 'Courier New', monospace;
  color: rgba(255,255,255,0.45);
}

/* Fila "+" */
.sp-unit-add-row-btn {
  font-size: 14px;
  font-weight: 500;
  color: rgba(0,0,0,0.75);
  cursor: pointer;
  text-align: left;
  padding: 3px 6px;
  border-radius: 8px;
  transition: background 0.12s;
  margin-top: 2px;
}

.sp-unit-add-row-btn:hover {
  background: rgba(0,0,0,0.06);
}

/* Contenedor de scroll + footer para el panel de units */
.sp-units-scroll {
  max-height: 200px;
  overflow-y: auto;
  overflow-x: hidden;
}

.sp-units-scroll::-webkit-scrollbar { width: 3px; }
.sp-units-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.20);
  border-radius: 3px;
}

.sp-units-footer {
  display: flex;
  justify-content: flex-end;
  padding: 5px 4px 2px;
  border-top: 1px solid rgba(255,255,255,0.10);
  margin-top: 3px;
}

.sp-units-add-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,0.18);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s;
  flex-shrink: 0;
  font-weight: 600;
}

.sp-units-add-btn:hover {
  background: rgba(0,0,0,0.30);
}

/* =========================
   CHIP ACTIVE / DIMMED
   cuando un subpanel está abierto
========================= */

.ui-chip.sp-chip-active {
  opacity: 1;
}

.ui-chip.sp-chip-dimmed {
  opacity: 0.38;
  transition: opacity 0.15s;
}

.ui-chip.sp-chip-active,
.ui-chip.sp-chip-dimmed {
  transition: opacity 0.15s;
}

/* =========================
   OPEN PANEL
========================= */

.sp-open-inner {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 380px;
}

.shape-dropdown:has(.sp-open-inner) {
  min-width: 0;
}

/* Search row — mismo grid que filas; la pill solo ocupa col name */
.sp-open-search-row {
  display: grid;
  grid-template-columns: 1fr 70px 70px 70px 16px;
  gap: 4px;
  margin-bottom: 4px;
}

.sp-open-search-pill {
  grid-column: 1;
  width: 120px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.10);
  border-radius: 999px;
  padding: 4px 10px;
}

.sp-open-search-icon {
  color: rgba(255,255,255,0.70);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.sp-open-search-icon svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

.sp-open-search {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  caret-color: white;
}

.sp-open-search::placeholder {
  color: rgba(255,255,255,0.30);
}

.sp-open-header {
  display: grid;
  grid-template-columns: 1fr 70px 70px 70px 16px;
  align-items: center;
  gap: 4px;
  padding: 2px 4px 5px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  margin-bottom: 2px;
}

.sp-open-header span {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  user-select: none;
}

.sp-open-header span:hover {
  color: rgba(255,255,255,0.85);
}

.sp-open-sort-arrow {
  font-size: 8px;
  opacity: 0.7;
}

.sp-open-list {
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
}

.sp-open-list::-webkit-scrollbar { width: 3px; }
.sp-open-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.20);
  border-radius: 3px;
}

.sp-open-loading {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  font-style: italic;
  text-align: center;
  padding: 16px 0;
}

.sp-open-row {
  display: grid;
  grid-template-columns: 1fr 70px 70px 70px 16px;
  align-items: center;
  gap: 4px;
  padding: 5px 4px;
  border-radius: 8px;
  cursor: default;
  transition: background 0.12s;
}

.sp-open-row:hover {
  background: rgba(255,255,255,0.06);
}

.sp-open-col-name {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.80);
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.sp-open-col-name-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.sp-open-col-name.sp-open-current {
  color: #fff;
  font-weight: 600;
}

.sp-open-col-date {
  font-size: 10px;
  color: rgba(255,255,255,0.60);
  white-space: nowrap;
}

.sp-open-col-owner {
  font-size: 10px;
  color: rgba(255,255,255,0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-open-col-del { width: 16px; }

.sp-open-del {
  font-size: 9px;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  text-align: center;
  border-radius: 3px;
  transition: color 0.12s;
}

.sp-open-del:hover {
  color: #ef4444;
}

/* =========================
   SHARE PANEL
========================= */

.sp-share-inner {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 380px;
}

.shape-dropdown:has(.sp-share-inner) {
  min-width: 0;
}

/* grid: email | name | avatar | role | del */
.sp-share-header,
.sp-share-row {
  display: grid;
  grid-template-columns: 1fr 1fr 18px 52px 16px;
  align-items: center;
  gap: 4px;
}

.sp-share-header {
  padding: 2px 4px 5px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  margin-bottom: 2px;
}

.sp-share-header span {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  user-select: none;
}

.sp-share-list {
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
}

.sp-share-list::-webkit-scrollbar { width: 3px; }
.sp-share-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.20);
  border-radius: 3px;
}

.sp-share-row {
  padding: 4px 4px;
  border-radius: 8px;
  transition: background 0.12s;
}

.sp-share-row:hover {
  background: rgba(255,255,255,0.06);
}

.sp-share-col-email {
  font-size: 10px;
  color: rgba(255,255,255,0.60);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-share-col-name {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Avatar placeholder (gray circle before user is selected) */
.sp-share-av-placeholder {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  flex-shrink: 0;
}

.sp-share-col-role {
  font-size: 10px;
  color: rgba(255,255,255,0.70);
  cursor: pointer;
  white-space: nowrap;
  padding: 1px 4px;
  border-radius: 4px;
  transition: background 0.12s;
  user-select: none;
}

.sp-share-col-role:hover {
  background: rgba(255,255,255,0.10);
  color: #fff;
}

/* Pending state before role is defined */
.sp-share-role-pending {
  color: rgba(255,255,255,0.28);
  cursor: default;
  pointer-events: none;
}

.sp-share-email-input {
  background: rgba(255,255,255,0.10);
  border: none;
  border-radius: 4px;
  outline: none;
  font-family: inherit;
  font-size: 10px;
  color: rgba(255,255,255,0.85);
  caret-color: white;
  padding: 2px 4px;
  width: 100%;
  box-sizing: border-box;
}

.sp-share-email-input::placeholder {
  color: rgba(255,255,255,0.30);
}

.sp-share-footer {
  display: flex;
  justify-content: flex-end;
  padding: 5px 4px 2px;
  border-top: 1px solid rgba(255,255,255,0.10);
  margin-top: 2px;
}

/* Autocomplete & role picker dropdowns */
.sp-share-dropdown {
  position: fixed;
  z-index: 9999;
  min-width: 200px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sp-share-dd-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  transition: background 0.12s;
}

.sp-share-dd-item:hover {
  background: rgba(255,255,255,0.10);
}

.sp-share-dd-email {
  font-size: 11px;
  color: rgba(255,255,255,0.85);
}

.sp-share-dd-name {
  font-size: 10px;
  color: rgba(255,255,255,0.45);
}

/* =========================
   INLINE COMMENTS CHIP
========================= */

.comments-chip-inline {
  height: auto !important;
  align-items: flex-start !important;
  background: transparent !important;
  overflow: visible !important;
  gap: 0;
}

.comments-chip-inline .ui-chip-label {
  height: 24px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.comments-ta-wrap {
  display: flex;
  align-items: flex-start;
  background: #cac9c9;
  border-radius: 12px;
  padding: 2px 6px 2px 4px;
  margin-left: -18px;
  flex-shrink: 0;
}

.comments-inline-ta {
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  overflow-y: auto;
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  color: #373737;
  line-height: 1.4;
  padding: 3px 4px 3px 18px;
  box-sizing: border-box;
  max-height: 52px;
  caret-color: #373737;
  width: 20px; /* JS lo ajusta */
}

.comments-inline-ta::placeholder {
  color: rgba(55,55,55,0.30);
}

.comments-inline-ta::-webkit-scrollbar { width: 3px; }
.comments-inline-ta::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 3px;
}

/* =========================
   NEW SHARE PILL (open panel rows)
========================= */

.sp-new-share-pill {
  flex-shrink: 0;
  background: #22c55e;
  color: #fff;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 1px 6px;
  white-space: nowrap;
  line-height: 1.6;
}

/* Badge circular en el chip Open (logo panel) — posición manejada por JS */
.sp-open-count-badge {
  min-width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  pointer-events: none;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,0.18);
  line-height: 1;
  box-sizing: border-box;
}

/* =========================
   EXPORT PANEL
========================= */

.sp-export-inner {
  padding: 4px 0;
  min-width: 72px;
}

.sp-export-option {
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
}

/* =========================
   BACKGROUND IMAGE PANEL
========================= */

.sp-bgimage-wrap {
  gap: 6px;
}

.sp-bgimage-preview {
  width: 100%;
  height: 80px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 4px;
}

.sp-bgimage-btn {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.80);
  background: rgba(255,255,255,0.10);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
  text-align: center;
  transition: background 0.12s;
}

.sp-bgimage-btn:hover {
  background: rgba(255,255,255,0.18);
}

.sp-bgimage-remove {
  color: rgba(255,100,100,0.80);
  background: rgba(255,100,100,0.10);
}

.sp-bgimage-remove:hover {
  background: rgba(255,100,100,0.20);
}
/* ─── TIMELINE PANEL (bottom sheet) ────────────────────────────────── */

#node-timeline-panel {
  position: fixed;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 20vh;
  min-height: 80px;
  background: rgba(30, 30, 36, 0.72);
  border-radius: 14px 14px 0 0;
  z-index: 99998;
  display: none;
  flex-direction: column;
  pointer-events: auto;
}

#node-timeline-panel.open {
  display: flex;
  animation: ntv-slide-up 0.22s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes ntv-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.ntv-resize-handle {
  height: 20px;
  cursor: ns-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ntv-resize-bar {
  width: 32px;
  height: 3px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  transition: background 0.15s;
}

.ntv-resize-handle:hover .ntv-resize-bar {
  background: rgba(255, 255, 255, 0.38);
}

.ntv-content {
  flex: 1;
  overflow: hidden;
  padding: 0 16px 16px;
}
