/* Inter Variable Font */
@font-face {
  font-family: "Inter";
  src: url("web-iterface-asset/Inter-VariableFont_opsz\,wght.ttf")
    format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("web-iterface-asset/Inter-Italic-VariableFont_opsz\,wght.ttf")
    format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  font-stretch: 0%; /* Note that font-stretch is a % of normal width */
  font-style: normal; /* See note below */
  font-weight: 100 900;
  src: url(web-iterface-asset/SpaceGrotesk-VariableFont_wght.ttf)
    format("woff2");
}

@font-face {
  font-family: "Space Grotesk";
  font-stretch: 0%; /* Note that font-stretch is a % of normal width */
  font-style: italic; /* See note below */
  font-weight: 100 900;
  src: url(web-iterface-asset/SpaceGrotesk-VariableFont_wght.ttf)
    format("woff2");
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* LIGHT THEME SETTING */

  --colour-050: #ffffff;
  --colour-100: #f8f9faff;
  --colour-200: #e9ecefff;
  --colour-300: #dee2e6ff;
  --colour-400: #ced4daff;
  --colour-500: #adb5bdff;
  --colour-600: #6c757dff;
  --colour-700: #495057ff;
  --colour-800: #343a40ff;
  --colour-900: #212529ff;

  --border-soft: var(--colour-200);
  --border-medium: var(--colour-300);
  --border-hard: var(--colour-400);
  --border-harder: var(--colour-600);
  --background-soft: var(--colour-050);
  --background-medium: var(--colour-100);
  --background-hard: var(--colour-200);
  --text-soft: var(--colour-500);
  --text-medium: var(--colour-600);
  --text-hard: var(--colour-800);

  /* DARK THEME SETTING */

  /* --colour-050: #121212;
  --colour-100: #1e1e1e;
  --colour-200: #242424;
  --colour-300: #2c2c2c;
  --colour-400: #3a3a3a;
  --colour-500: #5a5a5a;
  --colour-600: #8c8c8c;
  --colour-700: #bdbdbd;
  --colour-800: #e0e0e0;
  --colour-900: #ffffff;

  --border-soft: var(--colour-200);
  --border-medium: var(--colour-300);
  --border-hard: var(--colour-400);
  --border-harder: var(--colour-500);

  --background-soft: var(--colour-050);
  --background-medium: var(--colour-100);
  --background-hard: var(--colour-200);

  --text-soft: var(--colour-600);
  --text-medium: var(--colour-700);
  --text-hard: var(--colour-900); */
}

body {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  overflow: hidden;
  background: var(--colour-050);
  color: var(--colour-900);
}

.app-container {
  display: grid;
  grid-template-columns: 280px 1fr 400px;
  height: 100vh;
  position: relative;
}

/* Collapsed states */
.app-container.left-collapsed {
  grid-template-columns: 0px 1fr 700px;
}

.app-container.right-collapsed {
  grid-template-columns: 280px 1fr 0px;
}

.app-container.both-collapsed {
  grid-template-columns: 0px 1fr 0px;
}

/* Panels */
.panel {
  background: var(--background-medium);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  height: 100vh;
}

.panel-right {
  border-right: none;
  border-left: 1px solid var(--border-soft);
}

.panel.collapsed {
  width: 0;
  min-width: 0;
  overflow: hidden;
}

.panel-header {
  position: relative;
  padding: 4px 20px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.panel-header h2 {
  font-size: 15px;
  font-weight: 500;
  text-transform: capitalize;
  letter-spacing: 0.5px;
  color: var(--text-medium);
}

.collapse-btn {
  /* background: transparent; */
  background-color: var(--background-soft);
  border: none;
  color: var(--text-hard);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  /* border: 1px solid var(--border-medium); */
  box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px,
    rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
  transition: all 0.2s;
}

.collapse-btn:hover {
  background: var(--colour-900);
  color: var(--colour-100);
}

.panel-content {
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  height: 0; /* This forces the scroll */

  /* Hide scrollbar for Chrome, Safari and Opera */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.panel-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Toggle buttons (when collapsed) */
.panel-toggle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--colour-900);
  /* border: 1px solid #da4040; */
  color: var(--colour-100);
  padding: 12px 6px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s;
}

.panel-toggle:hover {
  background: var(--colour-700);
  color: var(--colour-050);
}

.panel-toggle-left {
  left: 0;
  border-radius: 0 6px 6px 0;
  border-left: none;
}

.panel-toggle-right {
  right: 0;
  border-radius: 6px 0 0 6px;
  border-right: none;
}

.panel-toggle.hidden {
  display: none;
}

/* Canvas Area */
.canvas-area {
  background: var(--background-hard);
  display: flex;
  flex-direction: column;
  min-width: 600px;
}

.canvas-toolbar {
  background: var(--background-medium);
  border-bottom: 1px solid var(--border-soft);
  padding: 0px 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* justify-content: space-between; */
  align-items: center;
  gap: 16px;
  height: 60px;
}

.canvas-toolbar > :nth-child(1) {
  justify-self: start;
}

.canvas-toolbar > :nth-child(2) {
  border: none;
  justify-self: center;
  padding: 4px 0px;
  display: inline-block;
  height: fit-content;
}

.canvas-toolbar > :nth-child(3) {
  border: none;
  justify-self: end;
}

.toolbar-container {
  display: inline-flex;
  gap: 8px;
}

.toolbar-tab-wrapper {
  width: auto;
  height: 42px;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background-color: var(--background-hard);
  /* border: 1px solid var(--border-soft); */
  overflow: visible;
}

.tab-btn {
  /* background: var(--background-medium); */
  background: transparent;
  border: none;
  /* border: 1px solid var(--border-hard); */
  color: var(--text-medium);
  padding: 0px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-family: "Inter";
  font-weight: 500;
  transition: all 0.2s;
  /* box-shadow: var(--background-hard); */
  box-shadow: rgba(0, 0, 0, 0) 0px 4px 12px;
}

.tab-btn:hover {
  color: var(--text-hard);
  /* background-color: rgba(255, 255, 255, 0.7); */
}

.tab-btn .fa-solid {
  font-size: 14px;
  margin-right: 8px;
  color: var(--text-soft);
}

.tab-btn:hover .fa-solid {
  color: var(--text-medium);
}

.tab-btn:focus {
  outline: none;
  /* box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5); */
}

.tab-btn.active {
  background: var(--background-soft);
  /* border-color: var(--border-medium); */
  color: var(--text-hard);
  /* Shadow effect - activ on at a time */
  /* box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px; */
  box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px -1px,
    rgba(0, 0, 0, 0.06) 0px 2px 4px -1px;
}

.tab-btn.active .fa-solid {
  color: var(--text-hard);
}

.template-select {
  background: var(--background-medium);
  border: 1px solid var(--border-hard);
  color: #1a1a1a;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.template-select:hover {
  border-color: var(--border-harder);
  background-color: var(--background-soft);
}

.preview-container {
  flex: 1;
  padding: 40px 40px 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

#previewFrame {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border-medium);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: var(--background-soft);
  margin: 0 auto 0 auto;
  max-width: 1920px;
  transition: width 0.2s ease, max-width 0.2s ease;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
}

.section-header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: fit-content;
  margin: 28px 0 16px 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}

.section-header {
  font-size: 12px;
  font-family: "Inter";
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-soft);
}

.section-header-wrapper:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#base-setting .control-row:nth-child(1) {
  margin-top: 8px;
}

#base-setting .control-row:last-child .multi-input-element {
  margin-bottom: 0;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.control-row.is-now-column {
  flex-direction: column;
  align-items: start;
  justify-content: start;
  gap: 12px;
  width: 100%;
}

.multi-input-element {
  display: flex;
  flex-direction: row;
  justify-content: start;
  gap: 4px;
  width: 100%;
  margin-bottom: 14px;
}

/* Make color inputs with pickers consistent */
.control-row:has(.color-picker) .control-input-group {
  max-width: calc(100% - 0px);
}

.control-row:has(.color-picker) .control-input {
  padding-right: 10px;
}

.control-label {
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  text-transform: capitalize;
  color: var(--text-medium);
  flex-shrink: 0;
  min-width: 100px;
}

/* Input Styles */

.control-input,
.control-select {
  background: var(--background-soft);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 0px 20px 0px 8px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 400;
  color: var(--text-hard);
  flex: 1;
  min-width: 0;
  max-width: 100%;
  height: 32px;
  box-sizing: border-box;
  width: 100%; /* Added */
  /* box-shadow: rgba(0, 0, 0, 0.03) 0px 2px 4px 0px inset; */
  /* box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px 0px; */
}

/* Cheveron properties */
.control-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%236c757d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
}

.control-input:hover,
.control-select:hover {
  border-color: var(--border-hard);
  color: var(--text-hard);
  /* box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px,
    rgba(0, 0, 0, 0.06) 0px 1px 2px 0px; */
}

.control-input:focus,
.control-select:focus {
  outline: none;
  border-color: var(--border-hard);
  box-shadow: rgba(3, 102, 214, 0.4) 0px 0px 0px 2px;
}

.control-input::placeholder {
  color: var(--text-soft);
}

.control-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
  max-width: 100%;
}

.control-input-group .control-input {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.control-unit {
  font-size: 12px;
  color: var(--text-soft);
  position: absolute;
  right: 10px;
  pointer-events: none;
}

.control-input-color {
  padding-right: 10px !important;
}

.color-picker {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

.color-picker::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.color-picker::-webkit-color-swatch {
  border: none;
  border-radius: 2px;
}

/* Number input arrows */
input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* RIGHT PANEL */

/* Right Panel Specific Styles */
.panel-header-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.toggle-btn {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--border-medium);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  padding: 0;
}

.toggle-btn::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toggle-btn:hover::after {
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.toggle-btn.active {
  background: var(--colour-900);
}

.toggle-btn.active::after {
  transform: translateX(20px);
}

/* Container for label alignment */
.toggle-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-label {
  font-family: "Inter", monospace;
  font-size: 11px;
}

/* Type Sections */
.type-section {
  margin-bottom: 32px;
}

.type-section-header {
  font-size: 12px;
  font-family: "Inter";
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-soft);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}

/* Type Items */
.type-item {
  margin-bottom: 8px;
  padding: 12px 12px 12px 0px;
  border-radius: 6px;
  transition: background 0.2s;
  position: relative;
}

.type-item:not(.default):hover::after {
  content: "×";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ff4444;
  color: white;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.type-preview {
  margin-bottom: 8px;
}

.type-text {
  font-family: "Inter", sans-serif;
  color: #1a1a1a;
  display: block;
  line-height: 1.3;

  /* Overflow control PROPERTIES */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.type-values {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #666666;
}

.type-values.hidden {
  display: none;
}

.value-item {
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 3px;
  transition: all 0.2s;
  font-family: inherit, monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-hard);
  border: 0.5px dotted var(--border-hard);
}

.value-item:hover {
  background: var(--background-soft);
  color: var(--text-hard);
  border-color: var(--border-harder);
}

.value-separator {
  color: var(--colour-300);
  user-select: none;
  display: none;
}

.em-value.hidden {
  display: none;
}

/* WCAG Badges */
.wcag-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.wcag-aaa {
  background: #22c55e;
  color: white;
}

.wcag-aa {
  background: #eab308;
  color: white;
}

.wcag-fail {
  background: #ef4444;
  color: white;
}

/* Add Type Button */
.add-type-btn {
  width: 100%;
  padding: 10px;
  background: #f8f8f8;
  border: 1px dashed var(--colour-300);
  border-radius: 6px;
  color: #666666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  transition: all 0.2s;
  margin-top: 12px;
}

.add-type-btn:hover {
  background: #f0f0f0;
  border-color: #b0b0b0;
  color: #1a1a1a;
}

.add-type-btn svg {
  stroke: currentColor;
  fill: none;
}

/* Download Button */
.download-btn {
  width: 100%;
  padding: 14px 16px;
  background: var(--colour-900);
  border: none;
  border-radius: 10px;
  color: var(--colour-100);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  margin-top: 24px;
}

.download-btn:hover {
  background: var(--colour-800);
}

/* Add Controls */
.add-controls {
  display: none !important;
  gap: 6px;
  margin-left: auto;
}

.type-item:hover .add-controls {
  display: flex;
}

.type-item:not(.default):hover::after {
  display: none !important;
}

.add-link {
  font-size: 11px;
  color: #0066ff;
  text-decoration: none;
  padding: 2px 4px;
  border-radius: 3px;
  transition: all 0.2s;
}

.add-link:hover {
  background: #e6f0ff;
  color: #0052cc;
}

/* Update type-values to support add-controls */
.type-values {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  font-size: 12px;
  color: #666666;
}

/* INFO BOX */

/* .info-box {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 10px 8px;
  max-width: 100%;
  background-color: var(--background-soft);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
}

.info-box.space {
  margin-top: 12px;
}

.info-box .title {
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  text-transform: capitalize;
  color: var(--text-soft);
  flex-shrink: 0;
}

.info-box .description {
  font-size: 12px;
  font-family: inherit;
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  overflow-wrap: anywhere;
  color: var(--text-medium);
  flex-shrink: 0;
  text-wrap: pretty;
  transition: color 0.15s ease;
} */

/* SECTION HEADER TOOLTIP */

.tooltip-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tooltip-trigger {
  font-size: 14px;
  cursor: pointer;
  color: var(--text-soft);
}

.tooltip-trigger:hover {
  color: var(--text-medium);
}

.tooltip-content {
  position: absolute;
  left: calc(100% + 8px); /* open to the right */
  top: 10%;
  padding: 12px 12px;
  max-width: 400px;
  background-color: var(--background-soft);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 15px -3px,
    rgba(0, 0, 0, 0.05) 0px 4px 6px -2px;
  transform: translateY(-50%) scale(0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.tooltip-content .tooltip-title {
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  text-transform: capitalize;
  color: var(--text-medium);
  flex-shrink: 0;
  margin-bottom: 0.4em;
}

.tooltip-content .tooltip-desc {
  font-size: 13px;
  font-family: "Inter";
  font-weight: 400;
  font-style: italic;
  line-height: 1.5;
  overflow-wrap: anywhere;
  color: var(--text-hard);
  flex-shrink: 0;
  text-wrap: pretty;
  transition: color 0.15s ease;
}

.tooltip-container:hover .tooltip-content,
.tooltip-container:focus-within .tooltip-content {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-10%) scale(1);
}

.icon-size-big {
  font-size: large;
}

/* ===== DEVICE BLOCKER (Mobile/Tablet) ===== */

.device-blocker {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--colour-050);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 40px;
  box-sizing: border-box;
}

.blocker-content {
  max-width: 500px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.blocker-logo {
  width: 60px;
  height: 60px;
  color: var(--colour-900);
  margin-bottom: 10px;
}

.blocker-content h2 {
  font-size: 28px;
  font-weight: 700;
  font-family: Inter, sans-serif;
  color: var(--colour-900);
  margin: 0;
  line-height: 1.2;
  text-wrap: balance;
}

.blocker-content p {
  font-size: 16px;
  font-weight: 400;
  color: var(--colour-700);
  line-height: 1.6;
  margin: 0;
}

.blocker-cta {
  font-size: 18px !important;
  font-weight: 600 !important;
  color: var(--colour-900) !important;
  padding: 16px 24px;
  background: var(--colour-200);
  border-radius: 12px;
  margin-top: 10px;
}

.blocker-specs {
  font-size: 13px;
  color: var(--colour-600);
  width: 100%;
  margin-top: 10px;
}

/* Show blocker on small devices */
@media (max-width: 1023px) {
  .device-blocker {
    display: flex !important;
  }

  .app-container {
    display: none !important;
  }
}

/* Adjust text size for very small screens */
@media (max-width: 480px) {
  .blocker-content h2 {
    font-size: 24px;
  }

  .blocker-content p {
    font-size: 14px;
  }

  .blocker-cta {
    font-size: 16px !important;
  }

  .blocker-logo {
    width: 48px;
    height: 48px;
  }
}

/* Preview Menu Trigger & Tray */

.preview-menu-trigger {
  position: absolute;
  right: -32px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--background-soft);
  border: none;
  color: var(--text-hard);
  cursor: pointer;
  padding: 4px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px,
    rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
  border-radius: 4px;
  z-index: 1;
}

.preview-menu-trigger,
.chevron-icon {
  transition: transform 0.3s ease;
}

/* Dropdown Tray */
.preview-menu-tray {
  position: absolute;
  overflow: visible;
  top: 0%;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: 500px;
  padding: 36px 16px 16px 16px;
  /* box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 15px -3px,
    rgba(0, 0, 0, 0.05) 0px 4px 6px -2px; */
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.preview-menu-trigger:hover,
.preview-menu-trigger:has(+ .preview-menu-tray:hover) {
  background: var(--colour-900);
  color: var(--colour-100);
}

.preview-menu-trigger:hover .chevron-icon,
.preview-menu-trigger:has(+ .preview-menu-tray:hover) .chevron-icon {
  transform: rotate(180deg);
}

.preview-menu-trigger:hover + .preview-menu-tray,
.preview-menu-tray:hover {
  opacity: 1;
  pointer-events: auto;
  user-select: auto;
  transform: translateX(-50%) translateY(0);
}
/* Menu Grid */
.preview-menu-grid {
  display: grid;
  z-index: 100;
  width: 100%;
  overflow: visible;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--background-medium);
  border: 1px solid var(--border-soft);
  box-shadow: rgba(0, 0, 0, 0.1) 0px 20px 25px -5px,
    rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;
}

.preview-menu-grid .section-header {
  padding: 16px 8px 12px 8px;
  grid-column: span 3;
}

/* Menu Links */
.toolbar-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--background-soft);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-hard);
  font-family: "Inter";
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
  box-shadow: rgba(0, 0, 0, 0) 0px 1px 3px 0px, rgba(0, 0, 0, 0) 0px 1px 2px 0px;
  z-index: 0;
}

.key-shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--background-medium);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-hard);
  font-family: "Inter";
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
  transform: scale(1);
  cursor: default;
  z-index: 0;
}

.toolbar-btn:hover {
  background: var(--colour-800);
  border-color: var(--border-harder);
  color: var(--colour-050);
  transform: scale(1.15) rotate(-2.5deg);
  box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px,
    rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;
  z-index: 1;
}

.toolbar-btn:hover .toolbar-btn i {
  font-size: 14px;
  color: var(--text-medium);
  flex-shrink: 0;
}

.toolbar-btn span,
.key-shortcut span {
  white-space: nowrap;
  width: 100%;
}

.toolbar-btn.two-cols {
  grid-column: span 2;
}

.toolbar-btn.three-cols {
  grid-column: span 3;
}
