.color-picker-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #f0f0f0; 
  border-radius: 50%;        
  cursor: pointer;
  transition: background-color 0.2s;
}

.color-picker-wrapper:hover {
  background-color: #e0e0e0;
}
.color-picker-wrapper i {
  color: #333;
  font-size: 1.2rem;
  pointer-events: none; 
}
.color-picker-wrapper input[type="color"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0; /* Hides the native button entirely */
  cursor: pointer;
}
#ftd-widget {
  font-family: system-ui, sans-serif;
  font-size: 13px;
  color: #333;
  max-width: 720px;
  margin: 0 auto;
}

#ftd-preview-wrap {
  background: repeating-conic-gradient(#e0e0e0 0% 25%, #f5f5f5 0% 50%) 0 0 / 16px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 16px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}
#ftd-img {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
#ftd-placeholder {
  color: #aaa;
  font-size: 13px;
  pointer-events: none;
}
.ftd-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid #ccc;
  border-top-color: #666;
  border-radius: 50%;
  animation: ftd-spin .6s linear infinite;
  vertical-align: middle;
  margin-right: 5px;
}
@keyframes ftd-spin { to { transform: rotate(360deg); } }
#ftd-loading { color: #888; font-size: 12px; }
#ftd-error   { color: #c0392b; font-size: 12px; }
#ftd-controls { display: flex; flex-direction: column; gap: 10px; }

.ftd-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ftd-row--full { flex-direction: column; align-items: stretch; gap: 4px; }

.ftd-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #888;
  min-width: 68px;
  flex-shrink: 0;
}

textarea#ftd-text {
  width: 100%;
  resize: vertical;
  font-size: 14px;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  background: #fafafa;
  color: #333;
  line-height: 1.5;
  min-height: 62px;
}
textarea#ftd-text:focus { outline: none; border-color: #888; }

input[type="range"] {
  width: 180px;
  accent-color: #555;
}

.ftd-swatch-row { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; }
.ftd-swatch {
  width: 22px; height: 22px;
  border-radius: 5px;
  border: 1.5px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .1s;
}
.ftd-swatch:hover { transform: scale(1.18); }
.ftd-swatch.active { border-color: #333; box-shadow: 0 0 0 1px #fff inset; }
.ftd-swatch--white { border-color: #ccc !important; }

input[type="color"] {
  width: 26px; height: 26px;
  border-radius: 5px;
  border: 1px solid #ddd;
  padding: 1px;
  cursor: pointer;
  background: none;
  flex-shrink: 0;
}

.ftd-effect-row { display: flex; gap: 6px; flex-wrap: wrap; }
.ftd-eff-btn {
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid #ddd;
  background: #fafafa;
  color: #555;
  font-size: 12px;
  cursor: pointer;
  transition: all .1s;
  font-family: inherit;
}
.ftd-eff-btn:hover { background: #f0f0f0; }
.ftd-eff-btn.active { background: #333; color: #fff; border-color: #333; }

.ftd-align-row { display: flex; gap: 5px; }
.ftd-align-btn {
  padding: 4px 12px;
  border-radius: 5px;
  border: 1px solid #ddd;
  background: #fafafa;
  color: #555;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.ftd-align-btn.active { background: #333; color: #fff; border-color: #333; }

.ftd-bg-btn {
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid #ddd;
  background: #fafafa;
  color: #888;
  font-size: 14px;
  cursor: pointer;
  height: 26px;
}
.ftd-bg-btn.active { background: #333; color: #fff; border-color: #333; }

.ftd-dl-btn {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fafafa;
  color: #333;
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: background .1s;
}
.ftd-dl-btn:hover { background: #efefef; }
.ftd-dl-btn.disabled { opacity: .4; pointer-events: none; }