/* =========================================================
   FONT VIEW — v1.6 (Clean + Fully Responsive)
   ========================================================= */

/* === Wrapper Utama === */
.fv-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  padding: 0;
  background: #fff;
  color: #111;
  max-width: var(--wp--style--global--content-size, 100%);
  width: 100%;
  margin: 0 auto;
  border: 0 solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  box-sizing: border-box;
  flex-wrap: nowrap;
}

/* === Sidebar === */
.fv-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 100px;
  min-width: 160px;
}

.fv-weight {
  border: none;
  background: none;
  font-size: 15px;
  cursor: pointer;
  text-align: left;
  padding: 4px 0;
  color: #555;
  transition: color 0.2s;
}
.fv-weight.active {
  color: #000;
  font-weight: 600;
}

/* === Konten Utama === */
.fv-main {
  flex: 1;
  width: 100%;
}

/* === Grid Glyph === */
.fv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 20px;
  justify-items: center;
  align-items: center;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  border-top: 1px solid #eee;
  padding-top: 20px;
}

.fv-grid span {
  font-size: 42px;
  font-family: FVUploadedFont, serif;
  cursor: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.fv-grid span:hover {
  transform: scale(1.15);
  opacity: 0.6;
}

/* === Glyph Info === */
.fv-glyph-info {
  font-size: 15px;
  color: #666;
  margin-bottom: 16px;
  text-align: left;
}

/* === Filter Bar === */
.fv-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

/* === Filter Button (Outline Style) === */
.fv-filter {
  border: 1px solid #111;
  background: transparent;
  color: #111;
  padding: 6px 14px;
  border-radius: 2px;
  font-size: 14px;
  letter-spacing: 0.1px;
  cursor: pointer;
  font-weight: 400;
  transition: all 0.25s ease;
}

.fv-filter:hover {
  background: #111;
  color: #fff;
}

.fv-filter.active {
  background: #111;
  color: #fff;
}

/* === Filter Wrapper === */
.fv-filters {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* === Zoom Circle === */
#fv-zoom-circle {
  position: absolute;
  pointer-events: none;
  width: 260px;
  height: 260px;
  margin-left: -130px;
  margin-top: -130px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity .2s, transform .2s;
  z-index: 9999;
}

#fv-zoom-circle.active {
  opacity: 1;
  transform: scale(1);
}

#fv-zoom-char {
  font-family: FVUploadedFont, serif;
  font-size: 180px;
  line-height: 1;
}

/* =========================================================
   RESPONSIVE STYLES
   ========================================================= */

/* === Tablet (<=1024px) === */
@media (max-width: 1024px) {
  .fv-wrap {
    gap: 24px;
    flex-wrap: wrap;
    padding: 16px;
  }

  .fv-sidebar {
    position: relative;
    top: 0;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
  }

  .fv-weight {
    font-size: 14px;
    padding: 6px 10px;
    background: #f7f7f7;
    border-radius: 6px;
  }

  .fv-main {
    width: 100%;
  }

  .fv-grid {
    gap: 12px;
  }

  .fv-grid span {
    font-size: 36px;
  }

  #fv-zoom-char {
    font-size: 120px;
  }
}

/* === Mobile (<=768px) === */
@media (max-width: 768px) {
  .fv-wrap {
    flex-direction: column;
    gap: 16px;
    padding: 12px;
  }

  .fv-sidebar {
    order: 1;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: leftr;
    width: 100%;
    gap: 6px;
  }

  .fv-main {
    order: 2;
    width: 100%;
  }

  .fv-grid {
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
  }

  .fv-grid span {
    font-size: 28px;
  }

  #fv-zoom-circle {
    width: 160px;
    height: 160px;
    margin-left: -80px;
    margin-top: -80px;
  }

  #fv-zoom-char {
    font-size: 80px;
  }

  .fv-filter {
    padding: 6px 10px;
    font-size: 13px;
  }
}

/* === Extra Small (<=480px) === */
@media (max-width: 480px) {
  .fv-grid {
    grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
    gap: 6px;
  }

  .fv-grid span {
    font-size: 22px;
  }

  .fv-weight {
    font-size: 13px;
  }

  .fv-filter {
    padding: 5px 8px;
    font-size: 12px;
    border-radius: 4px;
  }
}

* =========================================================
   OPTIONAL DARK MODE SUPPORT
   ========================================================= */
@media (prefers-color-scheme: dark) {
  .fv-wrap {
    background: #111;
    color: #eee;
    box-shadow: none;
  }

  .fv-weight {
    color: #aaa;
  }
  .fv-weight.active {
    color: #fff;
  }

  .fv-filter {
    border-color: #555;
    color: #ddd;
    background: transparent;
  }

  .fv-filter:hover,
  .fv-filter.active {
    background: #fff;
    color: #000;
  }

  .fv-grid {
    border-top-color: #333;
  }

  #fv-zoom-circle {
    background: rgba(32,32,32,0.85);
    border-color: rgba(255,255,255,0.1);
  }
}
