/* =============================================
   Font Preview Pro – Frontend v6
   Inline glyph rows (creatypestudio-style)
   ============================================= */

/* ── Wrapper ───────────────────────────────── */
.fpp-wrap { padding: 24px 0; width: 100%; }

/* ── Controls ──────────────────────────────── */
.fpp-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 32px;
}

.fpp-controls select,
.fpp-controls .fpp-text-input {
  height: 40px;
  padding: 0 14px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  color: #222;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .2s, box-shadow .2s;
}
.fpp-controls select          { min-width: 190px; cursor: pointer; }
.fpp-controls .fpp-text-input { flex: 1 1 180px; }
.fpp-controls select:focus,
.fpp-controls .fpp-text-input:focus {
  border-color: #888;
  box-shadow: 0 0 0 3px rgba(0,0,0,.06);
  outline: none;
}

/* Slider groups */
.fpp-size-control,
.fpp-lh-control,
.fpp-ls-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 148px;
}
.fpp-size-control label,
.fpp-lh-control  label,
.fpp-ls-control  label {
  font-size: 11px !important;
  font-weight: 400 !important;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #999;
  margin: 0 !important;
  white-space: nowrap;
  padding-bottom: 10px !important;
}
.fpp-size-range,
.fpp-lh-range,
.fpp-ls-range {
  width: 100%;
  height: 1px;
  accent-color: #111;
  cursor: pointer;
  margin: 0;
}
.fpp-size-val,
.fpp-lh-val,
.fpp-ls-val {
  display: inline-block;
  min-width: 24px;
  color: #111;
  font-weight: 700;
}

/* ── Font family tabs ──────────────────────── */
.fpp-font-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 26px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}
.fpp-font-tab {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  padding: 8px 18px;
  border: 1.5px solid #e2e2e2;
  border-radius: 99px;
  background: #fff;
  color: #555;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .18s;
  line-height: 1.4;
}
.fpp-font-tab:hover {
  border-color: #999;
  color: #111;
}
.fpp-font-tab-active {
  background: #111;
  border-color: #111;
  color: #fff;
}

.fpp-font-panel { animation: fpp-fade .25s ease; }
@keyframes fpp-fade { from { opacity: 0; } to { opacity: 1; } }

/* ── Preview rows ──────────────────────────── */
.fpp-font-row {
  margin-bottom: 30px;
  padding-bottom: 28px;
  border-bottom: 1px solid #f0f0f0;
}
.fpp-font-row:last-child { border-bottom: none; margin-bottom: 0; }

.fpp-font-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.fpp-font-header h4 {
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 0 !important;
  color: #aaa;
}

.fpp-css-preview {
  overflow-x: auto;
  word-break: break-word;
  min-height: 1em;
  padding: 4px 0;
  white-space: pre-wrap;
}

/* ─────────────────────────────────────────────
   GLYPH SET — inline flowing rows, selectable text
   ───────────────────────────────────────────── */
.fpp-glyphset-area {
  margin-top: 8px;
  padding-top: 28px;
  border-top: 2px solid #f0f0f0;
}

.fpp-glyphset {
  margin-bottom: 28px;
}
.fpp-glyphset:last-child {
    margin-top: 30px
}

.fpp-glyphset-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.fpp-glyphset-head h4 {
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin: 0 !important;
  color: #333;
}
.fpp-glyphset-hint {
  font-size: 12px;
  color: #bbb;
}

.fpp-glyphset-error {
  display: none;
  font-size: 13px;
  color: #c0392b;
  background: #fdf0f0;
  border: 1px solid #fac5c5;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

/* Category group */
.fpp-glyph-group {
  margin-bottom: 22px;
}
.fpp-glyph-group:last-child { margin-bottom: 0; }

.fpp-glyph-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #c0c0c0;
  margin-bottom: 8px;
}

/* The row of glyphs — flowing selectable text */
.fpp-glyph-row {
  font-size: 50px;
  line-height: 1;
  color: #000000;
  word-break: break-word;
  /* selectable by default */
  -webkit-user-select: text;
  user-select: text;
  /* font-family set inline by JS */
}

/* Each glyph — selectable + clickable */
.fpp-glyph-ch {
  display: inline-block;
  padding: 0 .12em;
  cursor: pointer;
  border-radius: 4px;
  transition: background .12s, color .12s;
}
.fpp-glyph-ch:hover {
  background: #f0f0f0;
}
.fpp-glyph-ch-hit {
  background: #def0de !important;
  color: #2e7d32;
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 680px) {
  .fpp-controls { gap: 10px; }
  .fpp-controls select,
  .fpp-controls .fpp-text-input { min-width: 100%; width: 100%; flex: none; }
  .fpp-size-control,
  .fpp-lh-control,
  .fpp-ls-control  { min-width: calc(50% - 5px); }

  .fpp-glyph-row { font-size: 24px; }
}
