/* =============================================
   FM Web Runtime — Design System
   Phase 5: "Burn the Ships"
   ============================================= */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Typography */
  --fm-font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --fm-font-size: 14px;
  --fm-font-size-sm: 12px;
  --fm-font-size-lg: 16px;
  --fm-line-height: 1.5;

  /* Spacing */
  --fm-spacing-xs: 4px;
  --fm-spacing-sm: 8px;
  --fm-spacing-md: 12px;
  --fm-spacing-lg: 16px;
  --fm-spacing-xl: 24px;

  /* Field dimensions (match FM Desktop: 14px font, 24px height) */
  --fm-field-height: 24px;
  --fm-field-radius: 6px;
  --fm-field-border: 1px solid var(--fm-border);

  /* Touch dimensions (larger targets for tablet/mobile) */
  --fm-touch-field-height: 36px;
  --fm-touch-font-size: 16px;

  /* Transitions */
  --fm-transition: 150ms ease;
}

body {
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
  line-height: var(--fm-line-height);
  color: var(--fm-text);
  background: var(--fm-bg);
  -webkit-font-smoothing: antialiased;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

/* =============================================
   SHOWCASE LAYOUT (for demo page only)
   ============================================= */

.showcase-header {
  background: linear-gradient(
    135deg,
    var(--fm-header-bg-start) 0%,
    var(--fm-header-bg-end) 100%
  );
  color: var(--fm-header-text);
  padding: var(--fm-spacing-xl) var(--fm-spacing-xl);
  text-align: center;
}

.showcase-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: var(--fm-spacing-xs);
}

.showcase-header p {
  color: var(--fm-header-subtext);
  font-size: var(--fm-font-size-lg);
  font-weight: 400;
}

.showcase {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--fm-spacing-xl);
}

.showcase h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--fm-text);
  margin-bottom: var(--fm-spacing-lg);
  padding-bottom: var(--fm-spacing-sm);
  border-bottom: 2px solid var(--fm-border);
}

.showcase-footer {
  text-align: center;
  padding: var(--fm-spacing-xl);
  color: var(--fm-text-secondary);
  font-size: var(--fm-font-size-sm);
}

/* --- Component Card (showcase wrapper) --- */
.component-card {
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: 12px;
  padding: var(--fm-spacing-xl);
  margin-bottom: var(--fm-spacing-xl);
  box-shadow: var(--fm-card-shadow);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.component-label {
  display: flex;
  align-items: center;
  gap: var(--fm-spacing-sm);
  margin-bottom: var(--fm-spacing-lg);
}

.component-number {
  background: var(--fm-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.component-name {
  font-size: var(--fm-font-size-lg);
  font-weight: 600;
}

.component-tag {
  font-family: "Courier New", monospace;
  font-size: var(--fm-font-size-sm);
  color: var(--fm-accent);
  background: #f0f4ff;
  padding: 2px 8px;
  border-radius: 4px;
}

.component-demo {
  display: flex;
  flex-wrap: wrap;
  gap: var(--fm-spacing-lg);
  padding: var(--fm-spacing-lg);
  background: var(--fm-bg);
  border-radius: var(--fm-field-radius);
  margin-bottom: var(--fm-spacing-lg);
}

.component-info {
  border-top: 1px solid var(--fm-border);
  padding-top: var(--fm-spacing-md);
}

.component-info h4 {
  font-size: var(--fm-font-size-sm);
  font-weight: 600;
  color: var(--fm-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--fm-spacing-sm);
}

.component-info ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--fm-spacing-sm) var(--fm-spacing-lg);
}

.component-info li {
  font-size: var(--fm-font-size-sm);
  color: var(--fm-text-secondary);
}

.component-info code {
  font-family: "Courier New", monospace;
  font-size: 11px;
  background: #f0f4ff;
  color: var(--fm-accent);
  padding: 1px 5px;
  border-radius: 3px;
}

/* =============================================
   FM FIELD SYSTEM — The Core
   ============================================= */

/* --- Field Wrapper --- */
.fm-field {
  display: flex;
  flex-direction: column;
  gap: var(--fm-spacing-xs);
  min-width: 200px;
  flex: 1;
}

/* --- Horizontal Label Position (label to the left of input) --- */
.fm-field.fm-field-horizontal {
  flex-direction: row;
  align-items: center;
}

.fm-field.fm-field-horizontal > .fm-label {
  min-width: 80px;
  flex-shrink: 0;
}

/* Touch override for horizontal layout */
.fm-touch .fm-field.fm-field-horizontal > .fm-label {
  min-width: 100px;
}

/* --- Label --- */
.fm-label {
  font-size: var(--fm-font-size-sm);
  font-weight: 600;
  color: var(--fm-text);
  user-select: none;
}

.fm-required {
  color: var(--fm-error);
  font-weight: 700;
}

/* --- Edit Box (Text) --- */
.fm-edit-text {
  height: var(--fm-field-height);
  padding: 0 var(--fm-spacing-md);
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
  color: var(--fm-text);
  background: var(--fm-surface);
  border: var(--fm-field-border);
  border-radius: var(--fm-field-radius);
  outline: none;
  transition:
    border-color var(--fm-transition),
    box-shadow var(--fm-transition);
  width: 100%;
}

.fm-edit-text::placeholder {
  color: var(--fm-text-placeholder);
}

/* Focus State (OnObjectEnter) */
.fm-edit-text:focus {
  border-color: var(--fm-border-focus);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

/* Read-only State */
.fm-edit-text.fm-readonly,
.fm-edit-text[readonly] {
  background: var(--fm-readonly-bg);
  color: var(--fm-readonly-text);
  cursor: default;
  border-style: dashed;
}

/* Validation Error State */
.fm-edit-text.fm-invalid,
.fm-edit-text:invalid:not(:placeholder-shown) {
  border-color: var(--fm-error);
}

.fm-edit-text.fm-invalid:focus {
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.15);
}

/* --- Edit Box (Number) --- */
.fm-edit-number {
  height: var(--fm-field-height);
  padding: 0 var(--fm-spacing-md);
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
  color: var(--fm-text);
  background: var(--fm-surface);
  border: var(--fm-field-border);
  border-radius: var(--fm-field-radius);
  outline: none;
  transition:
    border-color var(--fm-transition),
    box-shadow var(--fm-transition);
  width: 100%;
  text-align: right; /* Numbers right-aligned like FM */
}

.fm-edit-number::placeholder {
  color: var(--fm-text-placeholder);
  text-align: left;
}

/* Focus State */
.fm-edit-number:focus {
  border-color: var(--fm-border-focus);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

/* Read-only State */
.fm-edit-number[readonly] {
  background: var(--fm-readonly-bg);
  color: var(--fm-readonly-text);
  cursor: default;
  border-style: dashed;
}

/* Validation Error */
.fm-edit-number.fm-invalid,
.fm-edit-number:invalid:not(:placeholder-shown) {
  border-color: var(--fm-error);
}

.fm-edit-number.fm-invalid:focus {
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.15);
}

/* Hide browser spinner arrows (FM doesn't show them) */
.fm-edit-number::-webkit-outer-spin-button,
.fm-edit-number::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.fm-edit-number {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* --- Edit Box (Date) --- */
.fm-edit-date {
  height: var(--fm-field-height);
  padding: 0 var(--fm-spacing-md);
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
  color: var(--fm-text);
  background: var(--fm-surface);
  border: var(--fm-field-border);
  border-radius: var(--fm-field-radius);
  outline: none;
  transition:
    border-color var(--fm-transition),
    box-shadow var(--fm-transition);
  width: 100%;
}

.fm-edit-date:focus {
  border-color: var(--fm-border-focus);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.fm-edit-date[readonly] {
  background: var(--fm-readonly-bg);
  color: var(--fm-readonly-text);
  cursor: default;
  border-style: dashed;
}

.fm-edit-date.fm-invalid,
.fm-edit-date:invalid:not(:placeholder-shown) {
  border-color: var(--fm-error);
}

.fm-edit-date.fm-invalid:focus {
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.15);
}

/* --- Edit Box (Time) --- */
.fm-edit-time {
  height: var(--fm-field-height);
  padding: 0 var(--fm-spacing-md);
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
  color: var(--fm-text);
  background: var(--fm-surface);
  border: var(--fm-field-border);
  border-radius: var(--fm-field-radius);
  outline: none;
  transition:
    border-color var(--fm-transition),
    box-shadow var(--fm-transition);
  width: 100%;
}

.fm-edit-time:focus {
  border-color: var(--fm-border-focus);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.fm-edit-time[readonly] {
  background: var(--fm-readonly-bg);
  color: var(--fm-readonly-text);
  cursor: default;
  border-style: dashed;
}

.fm-edit-time.fm-invalid {
  border-color: var(--fm-error);
}

/* --- Edit Box (Timestamp) --- */
.fm-edit-timestamp {
  height: var(--fm-field-height);
  padding: 0 var(--fm-spacing-md);
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
  color: var(--fm-text);
  background: var(--fm-surface);
  border: var(--fm-field-border);
  border-radius: var(--fm-field-radius);
  outline: none;
  transition:
    border-color var(--fm-transition),
    box-shadow var(--fm-transition);
  width: 100%;
}

.fm-edit-timestamp:focus {
  border-color: var(--fm-border-focus);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.fm-edit-timestamp[readonly] {
  background: var(--fm-readonly-bg);
  color: var(--fm-readonly-text);
  cursor: default;
  border-style: dashed;
}

.fm-edit-timestamp.fm-invalid {
  border-color: var(--fm-error);
}

/* --- Text Area --- */
.fm-textarea {
  min-height: 72px;
  padding: var(--fm-spacing-sm) var(--fm-spacing-md);
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
  line-height: var(--fm-line-height);
  color: var(--fm-text);
  background: var(--fm-surface);
  border: var(--fm-field-border);
  border-radius: var(--fm-field-radius);
  outline: none;
  transition:
    border-color var(--fm-transition),
    box-shadow var(--fm-transition);
  width: 100%;
  resize: vertical; /* FM allows vertical resize only */
}

.fm-textarea::placeholder {
  color: var(--fm-text-placeholder);
}

.fm-textarea:focus {
  border-color: var(--fm-border-focus);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.fm-textarea[readonly] {
  background: var(--fm-readonly-bg);
  color: var(--fm-readonly-text);
  cursor: default;
  border-style: dashed;
  resize: none;
}

.fm-textarea.fm-invalid,
.fm-textarea:invalid:not(:placeholder-shown) {
  border-color: var(--fm-error);
}

.fm-textarea.fm-invalid:focus {
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.15);
}

/* --- Drop-down List (input + datalist = type-ahead) --- */
.fm-dropdown {
  height: var(--fm-field-height);
  padding: 0 var(--fm-spacing-md);
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
  color: var(--fm-text);
  background: var(--fm-surface);
  border: var(--fm-field-border);
  border-radius: var(--fm-field-radius);
  outline: none;
  transition:
    border-color var(--fm-transition),
    box-shadow var(--fm-transition);
  width: 100%;
}

.fm-dropdown::placeholder {
  color: var(--fm-text-placeholder);
}

.fm-dropdown:focus {
  border-color: var(--fm-border-focus);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.fm-dropdown[readonly] {
  background: var(--fm-readonly-bg);
  color: var(--fm-readonly-text);
  cursor: default;
  border-style: dashed;
}

.fm-dropdown.fm-invalid {
  border-color: var(--fm-error);
}

/* --- Pop-up Menu (select, no type-ahead) --- */
.fm-popup {
  height: var(--fm-field-height);
  padding: 0 var(--fm-spacing-sm);
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
  color: var(--fm-text);
  background: var(--fm-surface);
  border: var(--fm-field-border);
  border-radius: var(--fm-field-radius);
  outline: none;
  transition:
    border-color var(--fm-transition),
    box-shadow var(--fm-transition);
  width: 100%;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2386868b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
}

.fm-popup:focus {
  border-color: var(--fm-border-focus);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.fm-popup[disabled] {
  background: var(--fm-readonly-bg);
  color: var(--fm-readonly-text);
  cursor: default;
  border-style: dashed;
  opacity: 1;
}

.fm-popup.fm-invalid {
  border-color: var(--fm-error);
}

/* --- Checkbox Set --- */
.fm-checkbox-set {
  display: flex;
  flex-direction: column;
  gap: var(--fm-spacing-xs);
}

.fm-checkbox-set label {
  display: flex;
  align-items: center;
  gap: var(--fm-spacing-sm);
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
  color: var(--fm-text);
  cursor: pointer;
  user-select: none;
}

.fm-checkbox-set input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--fm-accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* --- Radio Button Set --- */
.fm-radio-set {
  display: flex;
  flex-direction: column;
  gap: var(--fm-spacing-xs);
}

.fm-radio-set label {
  display: flex;
  align-items: center;
  gap: var(--fm-spacing-sm);
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
  color: var(--fm-text);
  cursor: pointer;
  user-select: none;
}

.fm-radio-set input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--fm-accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* --- Drop-down Calendar (alias for fm-edit-date) --- */
/* Uses same styles as .fm-edit-date — no extra CSS needed */

/* =============================================
   TIER 2 — CONTROLS
   ============================================= */

/* --- #12 Button --- */
.fm-button {
  height: var(--fm-field-height);
  padding: 0 var(--fm-spacing-lg);
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
  font-weight: 500;
  color: #fff;
  background: var(--fm-accent);
  border: none;
  border-radius: var(--fm-field-radius);
  cursor: pointer;
  transition:
    background-color var(--fm-transition),
    box-shadow var(--fm-transition),
    transform var(--fm-transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--fm-spacing-xs);
  white-space: nowrap;
}

.fm-button:hover {
  filter: brightness(1.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.fm-button:active {
  transform: scale(0.97);
}

.fm-button:focus-visible {
  outline: 2px solid var(--fm-accent);
  outline-offset: 2px;
}

.fm-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button variants */
.fm-button.fm-secondary {
  background: transparent;
  color: var(--fm-accent);
  border: 1px solid var(--fm-accent);
}

.fm-button.fm-danger {
  background: var(--fm-error);
}

.fm-button.fm-ghost {
  background: transparent;
  color: var(--fm-text);
  border: 1px solid var(--fm-border);
}

.fm-button.fm-ghost:hover {
  background: var(--fm-surface);
}

/* --- #13 Popover Button --- */
.fm-popover-wrapper {
  position: relative;
  display: inline-block;
}

.fm-popover-content {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  padding: var(--fm-spacing-md);
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-field-radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 100;
}

.fm-popover-content.fm-open {
  display: block;
}

/* --- #14 Button Bar (Segmented Control) --- */
.fm-button-bar {
  display: inline-flex;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-field-radius);
  overflow: hidden;
}

.fm-button-bar button {
  height: var(--fm-field-height);
  padding: 0 var(--fm-spacing-md);
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
  color: var(--fm-text);
  background: var(--fm-surface);
  border: none;
  border-right: 1px solid var(--fm-border);
  cursor: pointer;
  transition:
    background-color var(--fm-transition),
    color var(--fm-transition);
  white-space: nowrap;
}

.fm-button-bar button:last-child {
  border-right: none;
}

.fm-button-bar button:hover {
  background: var(--fm-bg);
}

.fm-button-bar button.fm-active {
  background: var(--fm-accent);
  color: #fff;
}

/* --- #15 Tab Control --- */
.fm-tab-control {
  display: flex;
  flex-direction: column;
}

.fm-tab-list {
  display: flex;
  border-bottom: 2px solid var(--fm-border);
  gap: 0;
}

.fm-tab {
  padding: var(--fm-spacing-sm) var(--fm-spacing-lg);
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
  color: var(--fm-text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition:
    color var(--fm-transition),
    border-color var(--fm-transition);
  white-space: nowrap;
}

.fm-tab:hover {
  color: var(--fm-text);
}

.fm-tab.fm-active {
  color: var(--fm-accent);
  border-bottom-color: var(--fm-accent);
  font-weight: 500;
}

.fm-tab-panel {
  display: none;
  padding: var(--fm-spacing-lg);
  border: 1px solid var(--fm-border);
  border-top: none;
  border-radius: 0 0 var(--fm-field-radius) var(--fm-field-radius);
  background: var(--fm-surface);
}

.fm-tab-panel.fm-active {
  display: block;
}

/* --- #16 Slide Control --- */
.fm-slide-control {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-field-radius);
  background: var(--fm-surface);
}

.fm-slide-track {
  display: flex;
  transition: transform 0.3s ease;
}

.fm-slide-panel {
  min-width: 100%;
  padding: var(--fm-spacing-lg);
  flex-shrink: 0;
}

.fm-slide-dots {
  display: flex;
  justify-content: center;
  gap: var(--fm-spacing-sm);
  padding: var(--fm-spacing-sm);
}

.fm-slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fm-border);
  border: none;
  cursor: pointer;
  transition: background-color var(--fm-transition);
  padding: 0;
}

.fm-slide-dot.fm-active {
  background: var(--fm-accent);
}

/* =============================================
   TIER 3 — DISPLAY ELEMENTS
   ============================================= */

/* --- #17 Text Label --- */
.fm-text-label {
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
  color: var(--fm-text);
  line-height: var(--fm-line-height);
}

.fm-text-label.fm-heading {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
}

.fm-text-label.fm-subheading {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.fm-text-label.fm-caption {
  font-size: var(--fm-font-size-sm);
  color: var(--fm-text-secondary);
}

/* --- #18 Line (Separator) --- */
.fm-line {
  border: none;
  border-top: 1px solid var(--fm-border);
  margin: var(--fm-spacing-md) 0;
}

.fm-line.fm-thick {
  border-top-width: 2px;
}

.fm-line.fm-accent {
  border-top-color: var(--fm-accent);
}

.fm-line-vertical {
  display: inline-block;
  width: 1px;
  height: 100%;
  min-height: 24px;
  background: var(--fm-border);
  margin: 0 var(--fm-spacing-md);
}

/* --- #19 Rectangle / Shape --- */
.fm-shape {
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-field-radius);
  background: var(--fm-surface);
  padding: var(--fm-spacing-lg);
}

.fm-shape.fm-filled {
  background: var(--fm-bg);
}

.fm-shape.fm-accent-fill {
  background: var(--fm-accent);
  border-color: var(--fm-accent);
  color: #fff;
}

.fm-shape.fm-rounded {
  border-radius: 12px;
}

.fm-shape.fm-no-border {
  border: none;
}

.fm-shape.fm-circle {
  border-radius: 50%;
}

.fm-shape.fm-ellipse {
  border-radius: 50%;
}

.fm-shape.fm-triangle {
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  border: none;
  background: var(--fm-border);
}

.fm-shape.fm-triangle.fm-filled,
.fm-shape.fm-triangle.fm-accent {
  background: var(--fm-accent);
}

/* --- #20 Static Image --- */
.fm-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--fm-field-radius);
  border: 1px solid var(--fm-border);
  object-fit: contain;
}

.fm-image.fm-cover {
  object-fit: cover;
  width: 100%;
  height: 120px;
}

.fm-image.fm-no-border {
  border: none;
}

/* =============================================
   TIER 4 — CONTAINERS
   ============================================= */

/* --- #21 Web Viewer --- */
.fm-web-viewer {
  width: 100%;
  height: 200px;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-field-radius);
  background: var(--fm-surface);
}

/* --- #22 Container Field --- */
.fm-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  border: 2px dashed var(--fm-border);
  border-radius: var(--fm-field-radius);
  background: var(--fm-bg);
  color: var(--fm-text-secondary);
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
  padding: var(--fm-spacing-md);
  text-align: center;
}

.fm-container.fm-has-content {
  border-style: solid;
  border-width: 1px;
}

/* =============================================
   TIER 5 — COMPLEX (Vue.js)
   ============================================= */

/* --- #23 Portal --- */
.fm-portal {
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-field-radius);
  background: var(--fm-surface);
  overflow: hidden;
}

.fm-portal-header {
  display: flex;
  padding: var(--fm-spacing-xs) var(--fm-spacing-md);
  background: var(--fm-bg);
  border-bottom: 1px solid var(--fm-border);
  font-family: var(--fm-font);
  font-size: var(--fm-font-size-sm);
  font-weight: 600;
  color: var(--fm-text-secondary);
  gap: var(--fm-spacing-md);
}

.fm-portal-header span {
  flex: 1;
}

.fm-portal-body {
  max-height: 200px;
  overflow-y: auto;
}

.fm-portal-row {
  display: flex;
  padding: var(--fm-spacing-xs) var(--fm-spacing-md);
  border-bottom: 1px solid var(--fm-border);
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
  color: var(--fm-text);
  gap: var(--fm-spacing-md);
  cursor: pointer;
  transition: background-color var(--fm-transition);
}

.fm-portal-row:last-child {
  border-bottom: none;
}

.fm-portal-row:hover {
  background: var(--fm-bg);
}

.fm-portal-row.fm-active {
  background: var(--fm-accent);
  color: #fff;
}

.fm-portal-row span {
  flex: 1;
}

.fm-portal-empty {
  padding: var(--fm-spacing-lg);
  text-align: center;
  color: var(--fm-text-secondary);
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
}

/* --- #24 Data Grid --- */
.fm-data-grid {
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-field-radius);
  background: var(--fm-surface);
  overflow: hidden;
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
}

.fm-data-grid table {
  width: 100%;
  border-collapse: collapse;
}

.fm-data-grid thead th {
  padding: var(--fm-spacing-sm) var(--fm-spacing-md);
  background: var(--fm-bg);
  border-bottom: 2px solid var(--fm-border);
  text-align: left;
  font-weight: 600;
  font-size: var(--fm-font-size-sm);
  color: var(--fm-text-secondary);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color var(--fm-transition);
}

.fm-data-grid thead th:hover {
  color: var(--fm-text);
}

.fm-data-grid thead th.fm-sorted-asc::after {
  content: " ▲";
  font-size: 10px;
}

.fm-data-grid thead th.fm-sorted-desc::after {
  content: " ▼";
  font-size: 10px;
}

.fm-data-grid tbody td {
  padding: var(--fm-spacing-xs) var(--fm-spacing-md);
  border-bottom: 1px solid var(--fm-border);
  color: var(--fm-text);
}

.fm-data-grid tbody tr:hover {
  background: var(--fm-bg);
}

.fm-data-grid tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--fm-bg) 50%, var(--fm-surface));
}

.fm-data-grid tbody tr:nth-child(even):hover {
  background: var(--fm-bg);
}

.fm-data-grid tbody td input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
  color: var(--fm-text);
  padding: 2px 0;
  outline: none;
}

.fm-data-grid tbody td input:focus {
  outline: 2px solid var(--fm-accent);
  outline-offset: -1px;
  border-radius: 2px;
}

.fm-data-grid-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--fm-spacing-sm) var(--fm-spacing-md);
  background: var(--fm-bg);
  border-top: 1px solid var(--fm-border);
  font-size: var(--fm-font-size-sm);
  color: var(--fm-text-secondary);
}

.fm-data-grid-footer button {
  background: transparent;
  border: 1px solid var(--fm-border);
  border-radius: var(--fm-field-radius);
  padding: 2px 8px;
  font-family: var(--fm-font);
  font-size: var(--fm-font-size-sm);
  color: var(--fm-text);
  cursor: pointer;
  transition: background-color var(--fm-transition);
}

.fm-data-grid-footer button:hover {
  background: var(--fm-surface);
}

.fm-data-grid-footer button:disabled {
  opacity: 0.4;
  cursor: default;
}

/* --- Field Hint --- */
.fm-field-hint {
  font-size: 11px;
  color: var(--fm-text-secondary);
}

/* --- Field Error Message --- */
.fm-field-error {
  font-size: 11px;
  color: var(--fm-error);
  min-height: 16px;
}

/* =============================================
   FM TOUCH MODE — Larger targets for tablet/mobile
   Apply .fm-touch to any wrapper to scale up fields.
   ============================================= */

.fm-touch .fm-edit-text {
  height: var(--fm-touch-field-height);
  font-size: var(--fm-touch-font-size);
  padding: 0 var(--fm-spacing-md);
}

.fm-touch .fm-edit-number {
  height: var(--fm-touch-field-height);
  font-size: var(--fm-touch-font-size);
  padding: 0 var(--fm-spacing-md);
}

.fm-touch .fm-edit-date,
.fm-touch .fm-edit-time,
.fm-touch .fm-edit-timestamp {
  height: var(--fm-touch-field-height);
  font-size: var(--fm-touch-font-size);
  padding: 0 var(--fm-spacing-md);
}

.fm-touch .fm-textarea {
  font-size: var(--fm-touch-font-size);
  padding: var(--fm-spacing-sm) var(--fm-spacing-md);
}

.fm-touch .fm-dropdown {
  height: var(--fm-touch-field-height);
  font-size: var(--fm-touch-font-size);
}

.fm-touch .fm-popup {
  height: var(--fm-touch-field-height);
  font-size: var(--fm-touch-font-size);
}

.fm-touch .fm-checkbox-set label,
.fm-touch .fm-radio-set label {
  font-size: var(--fm-touch-font-size);
  gap: var(--fm-spacing-md);
}

.fm-touch .fm-checkbox-set input[type="checkbox"],
.fm-touch .fm-radio-set input[type="radio"] {
  width: 20px;
  height: 20px;
}

.fm-touch .fm-label {
  font-size: var(--fm-font-size);
}

.fm-touch .fm-field-hint {
  font-size: var(--fm-font-size-sm);
}

.fm-touch .fm-field-error {
  font-size: var(--fm-font-size-sm);
}

/* Tier 2 touch overrides */
.fm-touch .fm-button {
  height: var(--fm-touch-field-height);
  font-size: var(--fm-touch-font-size);
  padding: 0 var(--fm-spacing-xl);
}

.fm-touch .fm-button-bar button {
  height: var(--fm-touch-field-height);
  font-size: var(--fm-touch-font-size);
}

.fm-touch .fm-tab {
  font-size: var(--fm-touch-font-size);
  padding: var(--fm-spacing-md) var(--fm-spacing-xl);
}

.fm-touch .fm-slide-dot {
  width: 12px;
  height: 12px;
}

/* Tier 3 + 4 touch overrides */
.fm-touch .fm-text-label {
  font-size: var(--fm-touch-font-size);
}

.fm-touch .fm-text-label.fm-heading {
  font-size: 22px;
}

.fm-touch .fm-text-label.fm-subheading {
  font-size: 18px;
}

.fm-touch .fm-web-viewer {
  height: 250px;
}

/* Tier 5 touch overrides */
.fm-touch .fm-portal-header {
  padding: var(--fm-spacing-sm) var(--fm-spacing-md);
  font-size: var(--fm-touch-font-size);
}

.fm-touch .fm-portal-row {
  padding: var(--fm-spacing-sm) var(--fm-spacing-md);
  font-size: var(--fm-touch-font-size);
  min-height: var(--fm-touch-field-height);
  align-items: center;
}

.fm-touch .fm-portal-body {
  max-height: 260px;
}

.fm-touch .fm-data-grid thead th {
  padding: var(--fm-spacing-md) var(--fm-spacing-md);
  font-size: var(--fm-touch-font-size);
}

.fm-touch .fm-data-grid tbody td {
  padding: var(--fm-spacing-sm) var(--fm-spacing-md);
  font-size: var(--fm-touch-font-size);
}

.fm-touch .fm-data-grid tbody td input {
  font-size: var(--fm-touch-font-size);
  padding: 4px 0;
}

.fm-touch .fm-data-grid-footer {
  padding: var(--fm-spacing-md);
  font-size: var(--fm-touch-font-size);
}

.fm-touch .fm-data-grid-footer button {
  padding: 6px 12px;
  font-size: var(--fm-touch-font-size);
}

/* =============================================
   THEME TOGGLE BUTTON
   ============================================= */

.theme-toggle-wrapper {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: 50px;
  padding: 6px 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.theme-toggle-track {
  width: 40px;
  height: 22px;
  background: var(--fm-toggle-bg);
  border-radius: 11px;
  position: relative;
  transition: background-color 0.3s ease;
}

.theme-toggle-knob {
  width: 18px;
  height: 18px;
  background: var(--fm-toggle-knob);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition:
    transform 0.3s ease,
    background-color 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .theme-toggle-knob {
  transform: translateX(18px);
}

.theme-icon {
  font-size: 12px;
  transition: opacity 0.3s ease;
}

[data-theme="light"] .moon-icon {
  opacity: 0.3;
}

[data-theme="dark"] .sun-icon {
  opacity: 0.3;
}

/* =============================================
   CUSTOM COMPONENTS — Web-Only Extensions
   #25 Card, #26 Chart
   ============================================= */

/* --- #25 Card Component (fm-card) ---
   Adapted from Axelar Portfolio gallery-item.
   Hover: lift + shadow + accent border. */

.fm-card {
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--fm-card-shadow);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.fm-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-color: var(--fm-accent);
}

.fm-card-image {
  width: 100%;
  height: auto;
  border: 1px solid var(--fm-border);
  border-radius: 4px;
  display: block;
  margin-bottom: 16px;
}

.fm-card-image-placeholder {
  width: 100%;
  height: 160px;
  background: var(--fm-bg);
  border: 1px solid var(--fm-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--fm-text-secondary);
  font-size: var(--fm-font-size-sm);
}

.fm-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--fm-text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--fm-border);
}

.fm-card-body {
  font-size: var(--fm-font-size);
  color: var(--fm-text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.fm-card-label {
  color: var(--fm-accent);
  font-weight: 600;
  font-size: var(--fm-font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 6px;
}

.fm-card-section {
  margin-top: 12px;
}

.fm-card-highlight {
  background: var(--fm-bg);
  padding: 12px;
  border-radius: 6px;
  border-left: 3px solid var(--fm-accent);
  margin-top: 12px;
}

.fm-card-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--fm-border);
}

.fm-card-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--fm-bg);
  border: 1px solid var(--fm-border);
  border-radius: 4px;
  color: var(--fm-text);
  text-decoration: none;
  font-size: var(--fm-font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.fm-card-action:hover {
  background: var(--fm-accent);
  color: #fff;
  border-color: var(--fm-accent);
  transform: translateY(-2px);
  box-shadow: var(--fm-card-shadow);
}

/* --- #26 Chart Component (fm-chart) ---
   Wrapper for Chart.js canvas. */

.fm-chart {
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--fm-card-shadow);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.fm-chart-header {
  font-size: var(--fm-font-size);
  font-weight: 600;
  color: var(--fm-text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--fm-border);
}

.fm-chart-canvas-wrapper {
  position: relative;
  width: 100%;
}

.fm-chart-canvas-wrapper canvas {
  width: 100% !important;
  height: auto !important;
}

/* --- #27 Barcode Component (fm-barcode) --- */
/* Uses bwip-js for SVG rendering of 1D and QR codes */

.fm-barcode {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: 6px;
  padding: 8px;
  box-shadow: var(--fm-card-shadow);
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.fm-barcode svg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.fm-barcode-error {
  font-size: 11px;
  color: var(--fm-error);
  text-align: center;
  padding: 8px;
}

.fm-barcode-label {
  font-size: 11px;
  color: var(--fm-text-secondary);
  margin-top: 4px;
  text-align: center;
}

/* =============================================
   WINDOW MANAGER — FM Window Styles
   Document, Floating, Dialog, Card
   ============================================= */

/* --- Shared Titlebar --- */
.fm-window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--fm-border);
  user-select: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--fm-text);
}

.fm-window-close {
  background: none;
  border: none;
  color: var(--fm-text-secondary);
  font-size: 18px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color var(--fm-transition),
    color var(--fm-transition);
}

.fm-window-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--fm-error);
}

.fm-window-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
  color: var(--fm-text);
}

/* --- Floating Window --- */
.fm-window-float {
  position: fixed;
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fm-window-float .fm-window-titlebar {
  cursor: grab;
}

.fm-window-float .fm-window-titlebar:active {
  cursor: grabbing;
}

/* --- Dialog Window --- */
dialog.fm-window-dialog {
  border: 1px solid var(--fm-border);
  border-radius: 10px;
  background: var(--fm-surface);
  color: var(--fm-text);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

dialog.fm-window-dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

/* --- Card Window --- */
.fm-window-card-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fmCardOverlayIn 150ms ease;
}

.fm-window-card {
  background: var(--fm-surface);
  border: 1px solid var(--fm-border);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fmCardIn 150ms ease;
}

@keyframes fmCardOverlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fmCardIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* =============================================
   Phase 5: Rich Text Editor (Quill.js)
   ============================================= */
.fm-quill-editor {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--fm-surface); /* Ensure background matches theme */
}

/* Override Quill Toolbar Borders */
.fm-quill-editor .ql-toolbar.ql-snow {
  border: 1px solid var(--fm-border);
  border-bottom: 1px solid var(--fm-border);
  background: var(--fm-bg); /* Slightly distinct from editor area */
  border-radius: var(--fm-field-radius) var(--fm-field-radius) 0 0;
}

/* Editor Container */
.fm-quill-editor .ql-container.ql-snow {
  border: 1px solid var(--fm-border);
  border-top: none;
  border-radius: 0 0 var(--fm-field-radius) var(--fm-field-radius);
  background: var(--fm-surface);
  color: var(--fm-text);
  font-family: var(--fm-font);
  font-size: var(--fm-font-size);
}

/* Custom Clear All button styling */
.ql-clearAll {
  width: auto !important;
  padding: 0 8px !important;
}
.ql-clearAll::after {
  content: "✕ All";
  font-size: 11px;
}

.ql-snow .ql-picker.ql-font {
  width: 120px;
}
.ql-snow .ql-picker.ql-size {
  width: 70px;
}

/* Font family display names in dropdown */
.ql-snow .ql-picker.ql-font .ql-picker-label::before,
.ql-snow .ql-picker.ql-font .ql-picker-item::before {
  content: "Sans Serif";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="serif"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="serif"]::before {
  content: "Serif";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="monospace"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="monospace"]::before {
  content: "Monospace";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="arial"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="arial"]::before {
  content: "Arial";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="times"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="times"]::before {
  content: "Times";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="courier"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="courier"]::before {
  content: "Courier";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="georgia"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="georgia"]::before {
  content: "Georgia";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="verdana"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="verdana"]::before {
  content: "Verdana";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="tahoma"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="tahoma"]::before {
  content: "Tahoma";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="trebuchet"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="trebuchet"]::before {
  content: "Trebuchet";
}
.ql-snow .ql-picker.ql-font .ql-picker-label[data-value="helvetica"]::before,
.ql-snow .ql-picker.ql-font .ql-picker-item[data-value="helvetica"]::before {
  content: "Helvetica";
}

/* Apply actual fonts to editor content */
.ql-font-serif {
  font-family: Georgia, "Times New Roman", serif;
}
.ql-font-monospace {
  font-family: "Courier New", Courier, monospace;
}
.ql-font-arial {
  font-family: Arial, sans-serif;
}
.ql-font-times {
  font-family: "Times New Roman", Times, serif;
}
.ql-font-courier {
  font-family: "Courier New", Courier, monospace;
}
.ql-font-georgia {
  font-family: Georgia, serif;
}
.ql-font-verdana {
  font-family: Verdana, sans-serif;
}
.ql-font-tahoma {
  font-family: Tahoma, sans-serif;
}
.ql-font-trebuchet {
  font-family: "Trebuchet MS", sans-serif;
}
.ql-font-helvetica {
  font-family: Helvetica, Arial, sans-serif;
}

/* Size display in dropdown */
.ql-snow .ql-picker.ql-size .ql-picker-label::before,
.ql-snow .ql-picker.ql-size .ql-picker-item::before {
  content: "Normal";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="small"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="small"]::before {
  content: "Small";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="large"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="large"]::before {
  content: "Large";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="huge"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
  content: "Huge";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="10px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="10px"]::before {
  content: "10";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="12px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="12px"]::before {
  content: "12";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="14px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="14px"]::before {
  content: "14";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="16px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="16px"]::before {
  content: "16";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="18px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="18px"]::before {
  content: "18";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="20px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="20px"]::before {
  content: "20";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="24px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="24px"]::before {
  content: "24";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="32px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="32px"]::before {
  content: "32";
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="48px"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="48px"]::before {
  content: "48";
}
/* Apply actual sizes */
.ql-size-10px {
  font-size: 10px;
}
.ql-size-12px {
  font-size: 12px;
}
.ql-size-14px {
  font-size: 14px;
}
.ql-size-16px {
  font-size: 16px;
}
.ql-size-18px {
  font-size: 18px;
}
.ql-size-20px {
  font-size: 20px;
}
.ql-size-24px {
  font-size: 24px;
}
.ql-size-32px {
  font-size: 32px;
}
.ql-size-48px {
  font-size: 48px;
}
