/* ============================================================
   TEXT TOOL PANEL — Bozro Studio Photo Editor
   ============================================================ */

/* Panel heading */
.text-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.text-panel-heading h2 {
  margin: 0;
  font-size: 14px;
  color: #f8fafc;
}

/* Add Text button */
#addNewTextButton {
  display: none;
}

/* Section label */
.text-section-label {
  display: block;
  margin: 0 0 6px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Text section divider */
.text-section {
  margin-bottom: 14px;
}

/* Font family select */
#textFontFamily {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #0b0f19;
  color: #e2e8f0;
  font-size: 12px;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748b'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
#textFontFamily:focus { border-color: #f472b6; }

/* Font size row */
.text-size-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
#textFontSize {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: #334155;
  border-radius: 99px;
  outline: none;
  cursor: pointer;
}
#textFontSize::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f472b6;
  cursor: pointer;
  border: 2px solid #fff;
}
#textFontSizeValue {
  min-width: 32px;
  text-align: right;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
}

/* Color row */
.text-color-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.text-color-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 2px solid #334155;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.text-color-btn:hover { border-color: #f472b6; }
.text-color-btn input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.text-color-swatch {
  position: absolute;
  inset: 3px;
  border-radius: 4px;
  pointer-events: none;
}
.text-color-label {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.3;
}

/* Style toggle row: Bold / Italic / Underline */
.text-style-row {
  display: flex;
  gap: 6px;
}
.text-style-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 4px;
  border: 1px dotted #334155;
  border-radius: 8px;
  background: #182131;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.text-style-btn:hover { border-color: #f472b6; color: #f8fafc; }
.text-style-btn.active {
  border-color: #ec4899;
  background: #2a1040;
  color: #f472b6;
}

/* Alignment row */
.text-align-row {
  display: flex;
  gap: 6px;
}
.text-align-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px dotted #334155;
  border-radius: 8px;
  background: #182131;
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.text-align-btn:hover { border-color: #f472b6; color: #f8fafc; }
.text-align-btn.active {
  border-color: #ec4899;
  background: #2a1040;
  color: #f472b6;
}

/* Letter spacing */
.text-spacing-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
#textLetterSpacing {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: #334155;
  border-radius: 99px;
  outline: none;
  cursor: pointer;
}
#textLetterSpacing::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f472b6;
  cursor: pointer;
  border: 2px solid #fff;
}
#textLetterSpacingValue {
  min-width: 32px;
  text-align: right;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
}

/* Line height */
.text-lineheight-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
#textLineHeight {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: #334155;
  border-radius: 99px;
  outline: none;
  cursor: pointer;
}
#textLineHeight::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f472b6;
  cursor: pointer;
  border: 2px solid #fff;
}
#textLineHeightValue {
  min-width: 32px;
  text-align: right;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
}

/* Shadow toggle */
.text-shadow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.text-shadow-label {
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
}

/* Toggle switch */
.text-toggle-switch {
  position: relative;
  width: 38px;
  height: 22px;
  cursor: pointer;
}
.text-toggle-switch input { opacity: 0; width: 0; height: 0; }
.text-toggle-track {
  position: absolute;
  inset: 0;
  background: #334155;
  border-radius: 99px;
  transition: background 0.2s;
}
.text-toggle-switch input:checked + .text-toggle-track { background: #ec4899; }
.text-toggle-track::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.text-toggle-switch input:checked + .text-toggle-track::before {
  transform: translateX(16px);
}

/* No selection notice */
.text-no-selection {
  margin: 8px 0 0;
  padding: 10px;
  background: #182131;
  border-radius: 8px;
  color: #64748b;
  font-size: 11px;
  text-align: center;
  line-height: 1.5;
}

/* Opacity row */
.text-opacity-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
#textOpacity {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: #334155;
  border-radius: 99px;
  outline: none;
  cursor: pointer;
}
#textOpacity::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f472b6;
  cursor: pointer;
  border: 2px solid #fff;
}
#textOpacityValue {
  min-width: 32px;
  text-align: right;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 700;
}

