:root {
  --color-primary: #111827;
  --color-accent: #4F46E5;
  --color-bg: #ffffff;
  --color-bg-alt: #f9fafb;
  --color-text: #111827;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-rating: #F59E0B;
  --color-sale: #DC2626;
  --color-sale-bg: #FEF2F2;
  --color-success: #065F46;
  --color-success-bg: #ECFDF5;
  --font-heading: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 8px;
  --transition: 0.15s ease;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-accent, #4F46E5);
  outline-offset: 2px;
  border-radius: var(--radius, 8px);
}

.cart-badge--pulse {
  animation: cartBadgePulse 0.42s ease;
}

.cart-toast {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 240;
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  background: var(--color-primary, #111827);
  color: #ffffff;
  border-radius: var(--radius, 8px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.24);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 14px;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.cart-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.store-search-dialog {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: max(72px, 12vh) 18px 24px;
  background: rgba(17, 24, 39, 0.38);
}

.store-search-dialog.is-open {
  display: flex;
}

.store-search-panel {
  width: min(680px, 100%);
  background: var(--color-bg, #ffffff);
  color: var(--color-text, #111827);
  border: 1px solid var(--color-border, #e5e7eb);
  border-radius: var(--radius, 8px);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  overflow: hidden;
}

.store-search-form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 14px;
}

.store-search-input {
  min-width: 0;
  border: 0;
  background: var(--color-bg-alt, #f9fafb);
  border-radius: var(--radius, 8px);
  color: var(--color-text, #111827);
  font: inherit;
  font-size: 16px;
  padding: 14px 16px;
  width: 100%;
}

.store-search-submit,
.store-search-close {
  min-height: 44px;
  border: 0;
  border-radius: var(--radius, 8px);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.store-search-submit {
  background: var(--color-primary, #111827);
  color: #ffffff;
  padding: 0 18px;
}

.store-search-close {
  width: 44px;
  background: transparent;
  color: var(--color-text-muted, #6b7280);
  font-size: 22px;
  line-height: 1;
}

.store-search-help {
  border-top: 1px solid var(--color-border, #e5e7eb);
  color: var(--color-text-muted, #6b7280);
  font-size: 12px;
  padding: 10px 16px 14px;
}

.store-search-results {
  display: grid;
  gap: 2px;
  max-height: min(390px, 52vh);
  overflow-y: auto;
  padding: 0 10px 10px;
}

.store-search-result {
  align-items: center;
  border-radius: var(--radius, 8px);
  color: var(--color-text, #111827);
  display: grid;
  gap: 12px;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  min-height: 60px;
  padding: 8px;
  text-decoration: none;
}

.store-search-result:hover,
.store-search-result:focus-visible,
.store-search-result.is-active {
  background: var(--color-bg-alt, #f9fafb);
  outline: none;
}

.store-search-result__image {
  width: 44px;
  height: 44px;
  border-radius: calc(var(--radius, 8px) - 2px);
  background: var(--color-bg-alt, #f9fafb);
  object-fit: cover;
}

.store-search-result__image--placeholder {
  align-items: center;
  border: 1px solid var(--color-border, #e5e7eb);
  color: var(--color-text-muted, #9ca3af);
  display: flex;
  justify-content: center;
}

.store-search-result__image--placeholder svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.store-search-result__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.store-search-result__body strong,
.store-search-result__body span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-search-result__body strong {
  font-size: 14px;
  font-weight: 800;
}

.store-search-result__body span,
.store-search-result__price,
.store-search-empty {
  color: var(--color-text-muted, #6b7280);
  font-size: 12px;
}

.store-search-result__price {
  font-weight: 800;
  white-space: nowrap;
}

.store-search-empty {
  padding: 4px 6px 12px;
}

.store-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

@keyframes cartBadgePulse {
  0% { transform: scale(1); }
  45% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

@media (max-width: 560px) {
  .cart-toast {
    left: 16px;
    right: 16px;
    bottom: 18px;
    text-align: center;
  }

  .store-search-dialog {
    padding: 72px 12px 18px;
  }

  .store-search-form {
    grid-template-columns: 1fr auto;
  }

  .store-search-submit {
    grid-column: 1 / -1;
    width: 100%;
  }

  .store-search-result {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .store-search-result__price {
    grid-column: 2;
  }
}
/* ── Trix Editor — clean modern UI ── */

trix-editor {
  border: 1px solid #e5e7eb;
  border-top: none;
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  min-height: 300px;
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #1f2937;
  background: #fff;
  outline: none;
  box-shadow: none;
}

trix-editor:focus {
  outline: none;
  box-shadow: none;
}

/* Wrap toolbar + editor together so focus ring applies to the container */
trix-editor.trix-content + trix-toolbar,
trix-toolbar + trix-editor.trix-content {
  border-top: none;
}

/* ── Toolbar ── */
trix-toolbar {
  border: 1px solid #e5e7eb;
  border-bottom: 1px solid #f3f4f6;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  background: #f9fafb;
  padding: 0.5rem 0.625rem;
  display: flex !important;
  flex-wrap: wrap;
  gap: 0.25rem;
}

trix-toolbar .trix-button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.25rem;
  width: 100%;
  min-width: 0;
}

trix-toolbar .trix-button-group {
  display: flex;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  background: #fff;
  overflow: hidden;
  margin: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

trix-toolbar .trix-button-group:not(:last-child) {
  margin-right: 0.25rem;
}

trix-toolbar .trix-button {
  background: transparent;
  border: none;
  border-right: 1px solid #f3f4f6;
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6b7280;
  font-size: 0;
  position: relative;
  transition: background 0.1s, color 0.1s;
}

/* Keep the toolbar compact on phones without spreading groups across the row. */
@media (max-width: 639px) {
  trix-toolbar {
    padding: 0.375rem;
  }

  trix-toolbar .trix-button-group {
    max-width: 100%;
  }

  trix-toolbar .trix-button {
    width: 1.875rem;
    height: 1.875rem;
  }
}

/* Groups wrap onto new lines instead of squeezing buttons into each other. */
trix-toolbar .trix-button-group,
trix-toolbar .trix-button {
  flex-shrink: 0;
}

trix-toolbar .trix-button-group-spacer {
  display: none;
}

trix-toolbar .trix-button:last-child {
  border-right: none;
}

trix-toolbar .trix-button:hover {
  background: #f3f4f6;
  color: #111827;
}

trix-toolbar .trix-button.trix-active {
  background: #eef2ff;
  color: #4f46e5;
}

/* Icon rendering via mask */
trix-toolbar .trix-button::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1rem;
  height: 1rem;
  background-color: currentColor;
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  opacity: 0.75;
}

trix-toolbar .trix-button:hover::before { opacity: 1; }
trix-toolbar .trix-button.trix-active::before { opacity: 1; background-color: #4f46e5; }

.trix-button--icon-bold::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 4h8a4 4 0 010 8H6z'/%3E%3Cpath d='M6 12h9a4 4 0 010 8H6z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 4h8a4 4 0 010 8H6z'/%3E%3Cpath d='M6 12h9a4 4 0 010 8H6z'/%3E%3C/svg%3E");
}

.trix-button--icon-italic::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='4' x2='10' y2='4'/%3E%3Cline x1='14' y1='20' x2='5' y2='20'/%3E%3Cline x1='15' y1='4' x2='9' y2='20'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='4' x2='10' y2='4'/%3E%3Cline x1='14' y1='20' x2='5' y2='20'/%3E%3Cline x1='15' y1='4' x2='9' y2='20'/%3E%3C/svg%3E");
}

.trix-button--icon-strike::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.3 12H21M3 12h4.7M8 7.2A3.5 3.5 0 0112 5c2 0 3.5 1 3.5 2.8 0 .7-.2 1.3-.6 1.7M8.2 17C8.8 18.2 10.3 19 12 19c2.2 0 4-1.2 4-3s-1.5-2.8-4-3'/%3E%3Cline x1='3' y1='12' x2='21' y2='12'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.3 12H21M3 12h4.7M8 7.2A3.5 3.5 0 0112 5c2 0 3.5 1 3.5 2.8 0 .7-.2 1.3-.6 1.7M8.2 17C8.8 18.2 10.3 19 12 19c2.2 0 4-1.2 4-3s-1.5-2.8-4-3'/%3E%3Cline x1='3' y1='12' x2='21' y2='12'/%3E%3C/svg%3E");
}

.trix-button--icon-link::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 007.54.54l3-3a5 5 0 00-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 00-7.54-.54l-3 3a5 5 0 007.07 7.07l1.71-1.71'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 007.54.54l3-3a5 5 0 00-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 00-7.54-.54l-3 3a5 5 0 007.07 7.07l1.71-1.71'/%3E%3C/svg%3E");
}

.trix-button--icon-heading-1::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 4v16M18 4v16M6 12h12'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 4v16M18 4v16M6 12h12'/%3E%3C/svg%3E");
}

.trix-button--icon-quote::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z'/%3E%3Cpath d='M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z'/%3E%3Cpath d='M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z'/%3E%3C/svg%3E");
}

.trix-button--icon-code::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='16 18 22 12 16 6'/%3E%3Cpolyline points='8 6 2 12 8 18'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='16 18 22 12 16 6'/%3E%3Cpolyline points='8 6 2 12 8 18'/%3E%3C/svg%3E");
}

.trix-button--icon-bullet-list::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='9' y1='6' x2='20' y2='6'/%3E%3Cline x1='9' y1='12' x2='20' y2='12'/%3E%3Cline x1='9' y1='18' x2='20' y2='18'/%3E%3Ccircle cx='4' cy='6' r='1' fill='black' stroke='none'/%3E%3Ccircle cx='4' cy='12' r='1' fill='black' stroke='none'/%3E%3Ccircle cx='4' cy='18' r='1' fill='black' stroke='none'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='9' y1='6' x2='20' y2='6'/%3E%3Cline x1='9' y1='12' x2='20' y2='12'/%3E%3Cline x1='9' y1='18' x2='20' y2='18'/%3E%3Ccircle cx='4' cy='6' r='1' fill='black' stroke='none'/%3E%3Ccircle cx='4' cy='12' r='1' fill='black' stroke='none'/%3E%3Ccircle cx='4' cy='18' r='1' fill='black' stroke='none'/%3E%3C/svg%3E");
}

.trix-button--icon-number-list::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='10' y1='6' x2='21' y2='6'/%3E%3Cline x1='10' y1='12' x2='21' y2='12'/%3E%3Cline x1='10' y1='18' x2='21' y2='18'/%3E%3Cpath d='M4 6h1v4M4 10h2M6 18H4c0-1 2-2 2-3s-1-1.5-2-1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='10' y1='6' x2='21' y2='6'/%3E%3Cline x1='10' y1='12' x2='21' y2='12'/%3E%3Cline x1='10' y1='18' x2='21' y2='18'/%3E%3Cpath d='M4 6h1v4M4 10h2M6 18H4c0-1 2-2 2-3s-1-1.5-2-1'/%3E%3C/svg%3E");
}

.trix-button--icon-decrease-nesting-level::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='21' y1='6' x2='9' y2='6'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3Cline x1='21' y1='18' x2='9' y2='18'/%3E%3Cpolyline points='3 8 7 12 3 16'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='21' y1='6' x2='9' y2='6'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3Cline x1='21' y1='18' x2='9' y2='18'/%3E%3Cpolyline points='3 8 7 12 3 16'/%3E%3C/svg%3E");
}

.trix-button--icon-increase-nesting-level::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='21' y1='6' x2='9' y2='6'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3Cline x1='21' y1='18' x2='9' y2='18'/%3E%3Cpolyline points='7 8 3 12 7 16'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='21' y1='6' x2='9' y2='6'/%3E%3Cline x1='21' y1='12' x2='9' y2='12'/%3E%3Cline x1='21' y1='18' x2='9' y2='18'/%3E%3Cpolyline points='7 8 3 12 7 16'/%3E%3C/svg%3E");
}

.trix-button--icon-undo::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7v6h6'/%3E%3Cpath d='M21 17a9 9 0 00-9-9 9 9 0 00-6 2.3L3 13'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7v6h6'/%3E%3Cpath d='M21 17a9 9 0 00-9-9 9 9 0 00-6 2.3L3 13'/%3E%3C/svg%3E");
}

.trix-button--icon-redo::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 7v6h-6'/%3E%3Cpath d='M3 17a9 9 0 019-9 9 9 0 016 2.3L21 13'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 7v6h-6'/%3E%3Cpath d='M3 17a9 9 0 019-9 9 9 0 016 2.3L21 13'/%3E%3C/svg%3E");
}

/* Hide file attachment button */
trix-toolbar [data-trix-button-group="file-tools"] {
  display: none !important;
}

/* ── Link dialog ── */
trix-toolbar .trix-dialog {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  background: #fff;
  padding: 0.75rem;
  margin-top: 0.375rem;
}

trix-toolbar .trix-dialog__link-fields {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

trix-toolbar .trix-input--dialog {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.375rem 0.625rem;
  font-size: 0.8125rem;
  outline: none;
  flex: 1;
  color: #111827;
}

trix-toolbar .trix-input--dialog:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99,102,241,0.15);
}

trix-toolbar .trix-button--dialog {
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  width: auto;
  height: auto;
}

trix-toolbar .trix-button--dialog:hover {
  background: #4338ca;
}

/* ── Editor content typography ── */
trix-editor blockquote {
  border-left: 3px solid #e5e7eb;
  margin: 0.75rem 0;
  padding: 0.25rem 0 0.25rem 1rem;
  color: #6b7280;
  font-style: italic;
}

trix-editor pre {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  overflow-x: auto;
}

trix-editor h1 {
  font-size: 1.375rem;
  font-weight: 700;
  color: #111827;
  margin: 1rem 0 0.5rem;
}

trix-editor a {
  color: #4f46e5;
  text-decoration: underline;
  text-underline-offset: 2px;
}

trix-editor ul, trix-editor ol {
  padding-left: 1.375rem;
  margin: 0.5rem 0;
}

trix-editor li + li {
  margin-top: 0.25rem;
}

/* Placeholder */
trix-editor:empty:before {
  color: #9ca3af;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* Shared invoice receipt surface. The print rules let the printer driver choose
 * 58 mm or 80 mm paper while keeping the receipt within a readable width. */
.invoice-receipt {
  box-sizing: border-box;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.invoice-receipt__rule {
  border-top: 1px dashed #9ca3af;
}

@media print {
  @page {
    size: auto;
    margin: 0;
  }

  html,
  body {
    min-width: 0 !important;
    background: #fff !important;
  }

  body > * {
    display: none !important;
  }

  #invoice-modal-overlay {
    position: static !important;
    display: block !important;
    padding: 0 !important;
    background: transparent !important;
  }

  #invoice-modal-panel {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  .invoice-modal-toolbar,
  [data-invoice-modal-close] {
    display: none !important;
  }

  #invoice-modal-content {
    display: block !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  .invoice-receipt {
    width: 100% !important;
    max-width: 80mm !important;
    margin: 0 auto !important;
    padding: 3mm 4mm !important;
    font-size: 9pt !important;
    line-height: 1.25 !important;
    box-shadow: none !important;
  }

  .invoice-receipt__rule {
    margin-top: 2mm !important;
    margin-bottom: 2mm !important;
  }

  .invoice-receipt__item {
    margin-bottom: 2mm !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
