/* ==========================================================================
   JB AtlaZZ | Version 210 | css/tags.css
   Created by Dean Senecal and Sparky
   Purpose: Tag selection, badges and tag management
   Documentation updated: 2026-10-20
   Original creation date: not independently verified
   Maintenance: edit the named sections; keep change history in README_VERSION_210.txt
   ========================================================================== */

/* --- Tag panel and badges ---
   Maintenance: selectors below control this part of the tags interface.
   Change dimensions/colors here; check media-query overrides before adjusting widths.
*/
.jb-tag-badges {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 5px;
  vertical-align: middle;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.jb-tag-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  padding: 0;
  color: #fff;
  font-family: Arial,system-ui,sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  border: 0;
  background: var(--tag-color,#64748b);
  box-sizing: border-box;
  white-space: nowrap;
  text-shadow: 0 1px 1px #0005;
}

.jb-tag-badge[data-shape="circle"] {
  border-radius: 50%;
}

.jb-tag-badge[data-shape="square"] {
  border-radius: 4px;
}

.jb-tag-badge[data-shape="star"] {
  clip-path: polygon(50% 0%,63% 30%,98% 35%,72% 58%,80% 94%,50% 77%,20% 94%,28% 58%,2% 35%,37% 30%);
  width: 34px;
  height: 34px;
  padding-top: 1px;
  font-size: 10px;
}

.jb-tag-badge[data-shape="triangle"] {
  clip-path: polygon(50% 0%,100% 100%,0% 100%);
  width: 34px;
  height: 32px;
  padding-top: 12px;
  font-size: 10px;
}

.jb-tag-preview-label {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: -7px;
}

.jb-tag-preview {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.jb-tag-preview-badge {
  width: 62px;
  height: 62px;
  font-size: 22px;
  font-weight: 500;
  text-shadow: 0 1px 1px #0004;
}

.jb-tag-preview-badge[data-shape="star"],.jb-tag-preview-badge[data-shape="triangle"] {
  width: 78px;
  height: 76px;
  font-size: 20px;
}

.jb-tag-preview-badge[data-shape="triangle"] {
  padding-top: 27px;
}

.jb-tag-color-input {
  height: 44px !important;
  width: 100% !important;
  min-height: 44px;
  cursor: pointer;
  padding: 3px !important;
  border-radius: 6px;
}

.jb-tag-color-input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.jb-tag-color-input::-webkit-color-swatch {
  border: 1px solid #9ca3af;
  border-radius: 4px;
}

.jb-tag-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  max-width: 850px;
}

.jb-tag-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.jb-tag-panel button {
  min-height: 38px;
  padding: 6px 10px;
  cursor: pointer;
}

.jb-tag-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #aaa5;
  padding: 7px 0;
  flex-wrap: wrap;
}

.jb-tag-row .jb-tag-name {
  flex: 1;
  min-width: 130px;
  text-align: left;
}

.jb-tag-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0008;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.jb-tag-modal form {
  display: grid;
  gap: 12px;
  background: #fff;
  color: #222;
  padding: 22px;
  border-radius: 12px;
  max-width: 440px;
  width: 100%;
}

.jb-tag-modal label {
  display: grid;
  gap: 4px;
}

.jb-tag-modal input,.jb-tag-modal select {
  font: inherit;
  padding: 8px;
}

.jb-tag-modal .buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.song-row .song-cell.title .jb-tag-badges {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center;
  gap: 4px;
  min-width: max-content;
  overflow: visible;
  visibility: visible;
}

.song-row .song-cell.title .jb-tag-badge {
  display: inline-flex !important;
  flex-shrink: 0 !important;
  visibility: visible;
  opacity: 1;
}
