/* builder-redesign.css — the November 2026 Email Builder redesign.
 *
 * Loaded AFTER builder.css and overrides it on desktop (≥768px): top bar,
 * the Offers | Blocks | Style rail, the left panel, the canvas, the block
 * editor and the full-screen offer browser. Phones (<768px) keep the drawer
 * layout from builder.css; only shared pieces (rows, buttons) are restyled.
 *
 * Tokens follow the TMS design system, product mode (README of the handoff):
 * teal 50 #E6F5F6 · 100 #C5EAEE · 300 #5DB7C4 · 500 #0E8A99 · 600 #0A6E7E,
 * slate 50 #F0F1F4 · 100 #E7E9EE · 200 #D5D8DF · 500 #636C87 · 600 #4B5468
 * · 700 #334155 · 900 #0F1C31.
 */
.bld-app {
  --eb-teal-50: #E6F5F6; --eb-teal-100: #C5EAEE; --eb-teal-300: #5DB7C4;
  --eb-teal-500: #0E8A99; --eb-teal-600: #0A6E7E;
  --eb-s0: #FFFFFF; --eb-s50: #F0F1F4; --eb-s100: #E7E9EE; --eb-s200: #D5D8DF; --eb-s300: #B7BCC6;
  --eb-s400: #8B92A0; --eb-s500: #636C87; --eb-s600: #4B5468; --eb-s700: #334155; --eb-s800: #1F2937; --eb-s900: #0F1C31;
  --eb-red: #ED1A25;
  --eb-shadow-sm: 0 1px 2px rgba(28,27,24,.06), 0 1px 1px rgba(28,27,24,.04);
  --eb-shadow-md: 0 8px 24px -8px rgba(28,27,24,.14), 0 2px 4px rgba(28,27,24,.05);
  --eb-shadow-lg: 0 24px 48px -16px rgba(28,27,24,.20), 0 6px 12px rgba(28,27,24,.06);
  --eb-ease: cubic-bezier(.22,1,.36,1);
  background: var(--eb-s50);
  font-family: 'DM Sans', system-ui, sans-serif; color: var(--eb-s700);
  position: relative;
}
.bld-app ::-webkit-scrollbar { width: 10px; height: 8px; }
.bld-app ::-webkit-scrollbar-thumb { background: var(--eb-s200); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.eb-btn {
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  font: 500 14px/1 'DM Sans', system-ui, sans-serif; text-decoration: none;
  transition: background 120ms var(--eb-ease), border-color 120ms, color 120ms, opacity 120ms;
}
.eb-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.eb-btn:disabled { opacity: .5; cursor: not-allowed; }
.eb-btn--primary { background: var(--eb-teal-500); color: #fff; font-weight: 700; padding: 0 18px; }
.eb-btn--primary:hover:not(:disabled) { background: var(--eb-teal-600); }
.eb-btn--secondary { background: #fff; color: var(--eb-s800); border-color: var(--eb-s200); }
.eb-btn--secondary:hover:not(:disabled) { background: var(--eb-s50); }
.eb-btn--icon { width: 40px; padding: 0; }
.eb-btn--sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.eb-btn--block { width: 100%; }
.eb-linkbtn {
  border: none; background: transparent; padding: 0; cursor: pointer;
  font: 500 13px/1 'DM Sans', system-ui, sans-serif; color: var(--eb-teal-600);
  display: inline-flex; align-items: center; gap: 6px;
}
.eb-linkbtn:hover { color: var(--eb-teal-500); text-decoration: underline; text-underline-offset: 4px; }
.eb-linkbtn--icon { height: 32px; padding: 0 10px; border-radius: 8px; }
.eb-linkbtn--icon:hover { background: var(--eb-teal-50); text-decoration: none; }
.eb-linkbtn svg { width: 15px; height: 15px; }
.eb-linkbtn--light { color: #fff; opacity: .8; }
.eb-linkbtn--light:hover { color: #fff; opacity: 1; }

/* ── Top bar ──────────────────────────────────────────────────────────── */
.bld-topbar.eb-topbar {
  height: 64px; padding: 0 20px 0 12px; gap: 16px; background: #fff;
  border-bottom: 1px solid var(--eb-s200);
}
.eb-back {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center;
  color: var(--eb-s600); transition: background 120ms;
}
.eb-back:hover { background: var(--eb-s50); color: var(--eb-s900); }
.eb-back svg { width: 20px; height: 20px; }
.eb-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.eb-eyebrow { font: 700 11px/1 'DM Sans', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--eb-teal-500); }
.eb-topbar .bld-design-name {
  width: clamp(160px, 22vw, 300px); flex: none; margin: 0 0 0 -7px; padding: 2px 6px; height: auto;
  border: 1px solid transparent; border-radius: 6px; background: transparent; box-shadow: none;
  font: 700 16px/1.3 'DM Sans', sans-serif; color: var(--eb-s900);
}
.eb-topbar .bld-design-name:hover { border-color: var(--eb-s200); }
.eb-topbar .bld-design-name:focus { border-color: var(--eb-teal-500); background: #fff; box-shadow: 0 0 0 3px var(--eb-teal-50); }
/* Draft / Live / Expired pill beside an operator template's name (app.jsx). */
.eb-tmpl-badge {
  display: inline-flex; align-items: center; gap: 6px; flex: none; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px; font: 700 12px/1.2 'DM Sans', sans-serif;
  border: 1px solid transparent;
}
.eb-tmpl-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.eb-tmpl-badge.is-draft { background: #FFF4D6; color: #8A5A00; border-color: #F2D48A; }
.eb-tmpl-badge.is-live { background: var(--eb-teal-50); color: #0A6E6E; border-color: var(--eb-teal-100); }
.eb-tmpl-badge.is-expired { background: #FDECEC; color: #A32020; border-color: #F3C2C2; }
.eb-saved {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  border: none; background: transparent; padding: 4px 6px; border-radius: 6px; cursor: pointer;
  font: 400 13px/1 'DM Sans', sans-serif; color: var(--eb-s500);
}
.eb-saved svg { width: 16px; height: 16px; color: var(--eb-teal-500); }
.eb-saved:hover { background: var(--eb-s50); }
.eb-saved.is-error, .eb-saved.is-error svg { color: var(--eb-red); }
.eb-device { display: flex; gap: 4px; padding: 4px; background: var(--eb-s50); border-radius: 10px; flex-shrink: 0; }
.eb-device button {
  height: 32px; padding: 0 12px; border: none; border-radius: 7px; cursor: pointer; background: transparent;
  display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1 'DM Sans', sans-serif; color: var(--eb-s500);
  transition: background 120ms, color 120ms;
}
.eb-device button svg { width: 15px; height: 15px; }
.eb-device button.is-active { background: #fff; color: var(--eb-s900); box-shadow: var(--eb-shadow-sm); }
.eb-actions { display: flex; gap: 8px; align-items: center; }
.eb-next svg { width: 16px; height: 16px; }
.eb-next-short { display: none; }

/* ── Body: rail · panel · canvas · editor ─────────────────────────────── */
.bld-app .bld-main { position: relative; background: var(--eb-s50); }
.eb-rail {
  width: 76px; flex: none; background: #fff; border-right: 1px solid var(--eb-s200);
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 0;
}
.eb-rail-btn {
  width: 60px; padding: 10px 0 8px; border: none; border-radius: 12px; cursor: pointer; background: transparent;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font: 500 12px/1 'DM Sans', sans-serif; color: var(--eb-s500); transition: background 120ms, color 120ms;
}
.eb-rail-btn svg { width: 20px; height: 20px; }
.eb-rail-btn:hover { background: var(--eb-s50); color: var(--eb-s800); }
.eb-rail-btn.is-active { background: var(--eb-teal-50); color: var(--eb-teal-600); }

/* Left panel */
.bld-sidebar.eb-panel {
  width: clamp(280px, 26vw, 384px); flex: none; background: #fff; border-right: 1px solid var(--eb-s200);
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
.bld-sidebar.eb-panel--blocks, .bld-sidebar.eb-panel--style, .bld-sidebar.eb-panel--scroll { overflow-y: auto; }
.eb-panel--scroll .eb-scroll { overflow: visible; flex: none; }
.eb-offers-top { padding: 20px 20px 0; display: flex; flex-direction: column; gap: 14px; flex: none; }
.eb-offers-top .bld-brief, .eb-offers-top .bld-ai { margin: 0; }
.eb-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.eb-panel-head h2 { white-space: nowrap; margin: 0; font: 700 18px/1.2 'DM Sans', sans-serif; color: var(--eb-s900); letter-spacing: 0; }
.eb-panel-head--sub { margin-top: 26px; }
.eb-panel-head--sub h2 { font-size: 16px; }
.eb-filter-label { display: block; font: 500 12px/1.2 'DM Sans', sans-serif; color: var(--eb-s600); margin-bottom: 6px; }
.eb-hint { margin: 6px 0 14px; font: 400 13px/1.45 'DM Sans', sans-serif; color: var(--eb-s500); display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.eb-hint.is-insert { color: var(--eb-teal-600); font-weight: 500; }

/* Product dropdown */
.eb-product { display: block; }
.eb-product-field { position: relative; display: block; }
.eb-product-field > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--eb-teal-500); pointer-events: none; }
.eb-select {
  width: 100%; height: 40px; padding: 0 30px 0 12px; border-radius: 10px; border: 1px solid var(--eb-s200);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23636C87' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  -webkit-appearance: none; appearance: none; cursor: pointer; outline: none;
  font: 400 14px/1 'DM Sans', sans-serif; color: var(--eb-s900); text-overflow: ellipsis; min-width: 0;
  transition: border-color 120ms, box-shadow 120ms;
}
.eb-select:focus { border-color: var(--eb-teal-500); box-shadow: 0 0 0 3px var(--eb-teal-50); }
.eb-select--product { height: 44px; padding-left: 42px; font-size: 15px; font-weight: 700; }

/* Search + filters */
.eb-controls { padding: 14px 20px 14px; display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid var(--eb-s100); flex: none; }
.eb-search { position: relative; display: block; }
.eb-search > svg, .eb-search-field > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--eb-s400); pointer-events: none; }
.eb-search-field { position: relative; display: block; }
.eb-search-input {
  width: 100%; height: 44px; padding: 0 14px 0 42px; border-radius: 10px; border: 1px solid var(--eb-s200); background: #fff;
  font: 400 15px/1 'DM Sans', sans-serif; color: var(--eb-s900); outline: none; box-sizing: border-box;
  transition: border-color 120ms, box-shadow 120ms;
}
.eb-search-input::placeholder { color: var(--eb-s400); }
.eb-search-input:focus { border-color: var(--eb-teal-500); box-shadow: 0 0 0 3px var(--eb-teal-50); }
.eb-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.eb-filter { display: block; min-width: 0; }
.eb-filter.is-set .eb-select { border-color: var(--eb-teal-300); background-color: var(--eb-teal-50); }
.eb-controls--jet2 { gap: 10px; }

/* Results */
.eb-results-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 20px 4px; font: 400 12px/1.2 'DM Sans', sans-serif; color: var(--eb-s500); flex: none; }
.eb-results-head b { color: var(--eb-s900); font-weight: 700; }
.eb-results-head .eb-linkbtn { font-size: 12px; }
.eb-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px 20px; display: flex; flex-direction: column; gap: 4px; }
.eb-scroll--legacy { padding: 8px 8px 20px; }
.eb-scroll--legacy .bld-search { padding: 6px 8px 0; }
.eb-row {
  display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 10px; border-radius: 12px;
  transition: background 120ms;
}
.eb-row:hover { background: var(--eb-s50); }
.eb-row-img { width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--eb-teal-50); }
.eb-row-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eb-row-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.eb-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.eb-row-dest { font: 700 15px/1.25 'DM Sans', sans-serif; color: var(--eb-s900); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-row-price { font: 700 15px/1.25 'DM Sans', sans-serif; color: var(--eb-teal-600); white-space: nowrap; flex-shrink: 0; }
.eb-row-price small { font-size: 11px; font-weight: 500; color: var(--eb-s500); margin-left: 1px; }
.eb-row-deal { font: 400 13px/1.35 'DM Sans', sans-serif; color: var(--eb-s700); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.eb-row-meta { font: 400 12px/1.35 'DM Sans', sans-serif; color: var(--eb-s500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-row-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }
.eb-row-air { display: inline-flex; align-items: center; gap: 5px; font: 400 12px/1 'DM Sans', sans-serif; color: var(--eb-s500); min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.eb-row-air svg { width: 14px; height: 14px; flex-shrink: 0; }
.eb-add {
  height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--eb-s200); background: #fff; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; font: 700 12px/1 'DM Sans', sans-serif; color: var(--eb-s800); flex-shrink: 0;
  transition: background 120ms, border-color 120ms, color 120ms;
}
.eb-add svg { width: 14px; height: 14px; }
.eb-add:hover:not(:disabled) { border-color: var(--eb-teal-500); color: var(--eb-teal-600); }
.eb-add.is-added { background: var(--eb-teal-50); color: var(--eb-teal-600); border-color: var(--eb-teal-100); cursor: default; }
.eb-add:disabled:not(.is-added) { opacity: .6; cursor: progress; }
.eb-view {
  height: 28px; padding: 0 9px; margin-left: auto; margin-right: 6px; border-radius: 8px; border: 1px solid transparent; background: transparent; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; font: 600 12px/1 'DM Sans', sans-serif; color: var(--eb-teal-600); flex-shrink: 0;
}
.eb-view svg { width: 14px; height: 14px; }
.eb-view:hover { background: var(--eb-teal-50); border-color: var(--eb-teal-100); }
.eb-row-img.is-viewable { cursor: zoom-in; }
.eb-more { margin: 8px 8px 0; }
.eb-empty { text-align: center; padding: 36px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.eb-empty b { font: 700 15px/1.3 'DM Sans', sans-serif; color: var(--eb-s900); }
.eb-empty p { margin: 0 0 8px; font: 400 13px/1.45 'DM Sans', sans-serif; color: var(--eb-s500); max-width: 260px; }
.eb-error { margin: 4px 8px; padding: 10px 12px; border-radius: 10px; background: #FDECEC; color: #B4121B; font: 400 13px/1.4 'DM Sans', sans-serif; }

/* Blocks panel */
.eb-blocks, .eb-style { padding: 20px; }
.eb-tiles.bld-palette { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 0; }
.eb-tile.bld-palette-btn {
  align-items: flex-start; justify-content: flex-start; text-align: left; gap: 6px; padding: 14px; min-height: 0;
  border-radius: 14px; border: 1px solid var(--eb-s200); background: #fff;
}
.eb-tile.bld-palette-btn:hover:not(:disabled) { border-color: var(--eb-teal-300); background: var(--eb-teal-50); }
.eb-tile.bld-palette-btn:disabled { opacity: .5; cursor: not-allowed; }
.eb-tile .bld-palette-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--eb-teal-50); color: var(--eb-teal-600); margin-bottom: 4px; }
.eb-tile:hover .bld-palette-ic { background: #fff; }
.eb-tile .bld-palette-ic svg { width: 18px; height: 18px; }
.eb-tile b { font: 700 14px/1.2 'DM Sans', sans-serif; color: var(--eb-s900); }
.eb-tile small { font: 400 12px/1.35 'DM Sans', sans-serif; color: var(--eb-s500); }
.eb-offers-card {
  width: 100%; margin-top: 14px; padding: 14px 16px; border: 1.5px dashed var(--eb-teal-300); border-radius: 14px; cursor: pointer;
  background: var(--eb-teal-50); text-align: left; font: 400 13px/1.45 'DM Sans', sans-serif; color: var(--eb-s700);
  display: flex; flex-direction: column; gap: 2px;
}
.eb-offers-card b { color: var(--eb-teal-600); display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.eb-offers-card svg { width: 14px; height: 14px; }
.eb-seg { display: flex; gap: 4px; padding: 4px; background: var(--eb-s50); border-radius: 10px; margin: 10px 0 4px; }
.eb-seg button { flex: 1; height: 32px; border: none; border-radius: 7px; background: transparent; cursor: pointer; font: 500 13px/1 'DM Sans', sans-serif; color: var(--eb-s500); }
.eb-seg button.is-active { background: #fff; color: var(--eb-s900); box-shadow: var(--eb-shadow-sm); }
.eb-blocks .bld-search { padding: 10px 0 0; }

/* Style panel */
.eb-style-group { margin-bottom: 20px; }
.eb-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.eb-swatch {
  width: 40px; height: 40px; border-radius: 12px; border: 3px solid #fff; cursor: pointer; padding: 0;
  box-shadow: 0 0 0 1px var(--eb-s200); transition: box-shadow 120ms;
}
.eb-swatch.is-selected { box-shadow: 0 0 0 2px var(--eb-s900); }
.eb-swatch:disabled { cursor: not-allowed; opacity: .5; }
.eb-style-locked { display: flex; align-items: center; gap: 12px; }
.eb-style-locked span:last-child { display: flex; flex-direction: column; gap: 3px; }
.eb-style-locked b { font: 700 14px/1.2 'DM Sans', sans-serif; color: var(--eb-s900); }
.eb-style-locked small { display: inline-flex; align-items: center; gap: 5px; font: 400 12px/1.3 'DM Sans', sans-serif; color: var(--eb-s500); }
.eb-style-locked small svg { width: 12px; height: 12px; }
.eb-style .bld-ad { margin: 0 -20px; }
.eb-note { display: flex; gap: 10px; margin: 18px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--eb-s50); font: 400 13px/1.45 'DM Sans', sans-serif; color: var(--eb-s600); }
.eb-note svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--eb-teal-500); margin-top: 1px; }
.eb-note a { color: var(--eb-teal-600); font-weight: 500; }

/* ── Canvas ───────────────────────────────────────────────────────────── */
.bld-app .bld-canvas-area { min-width: 360px; background: var(--eb-s50); }
.bld-app .bld-canvas-scroll { padding: 32px 24px 80px; }
.bld-app .bld-paper { max-width: 600px; transition: max-width 220ms var(--eb-ease); }
.bld-app .is-device-mobile .bld-paper { max-width: 375px; }
.bld-app .bld-mail { border-radius: 6px; box-shadow: var(--eb-shadow-md); }
.bld-app .bld-block-wrap:first-child .bld-block,
.bld-app .bld-insert:first-child + .bld-block-wrap .bld-block { border-top-left-radius: 6px; border-top-right-radius: 6px; }
.bld-app .bld-block-wrap:last-child .bld-block { border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; }
.eb-canvas-help { margin: 14px 0 0; font: 400 12px/1.4 'DM Sans', sans-serif; color: var(--eb-s500); text-align: center; }
.bld-app .bld-block:hover { outline-color: var(--eb-teal-100); }
.bld-app .bld-block.is-selected { outline: 2px solid var(--eb-teal-500); outline-offset: -2px; box-shadow: none; }
.bld-app .bld-block-tag {
  top: -11px; left: 12px; padding: 4px 9px; border-radius: 999px; background: var(--eb-teal-500); color: #fff;
  font: 700 11px/1 'DM Sans', sans-serif; letter-spacing: .06em; text-transform: uppercase; box-shadow: none;
}
/* The toolbar sits just inside the block's top-right corner: inside the
   canvas column (it used to float outside the email), and clear of the gap
   between blocks, where the "+ Add here" line is drawn. */
.bld-app .bld-actions {
  top: 10px; right: 10px; left: auto; flex-direction: row; gap: 2px; padding: 4px;
  background: #fff; border-radius: 10px; box-shadow: var(--eb-shadow-md);
}
.bld-app .bld-action { width: 30px; height: 30px; border: none; border-radius: 7px; box-shadow: none; background: transparent; color: var(--eb-s600); }
.bld-app .bld-action:hover:not(:disabled) { background: var(--eb-s50); color: var(--eb-s900); }
.bld-app .bld-action.is-danger { color: var(--eb-red); }
.bld-app .bld-action.is-danger:hover:not(:disabled) { background: #FDECEC; color: var(--eb-red); }
/* "+ Add here": shown when you hover the block above it (or the pill itself).
   The strip takes NO clicks — only its pill does — so a click anywhere on a
   section selects that section, edges included. It used to be a 14px band
   over the edges of both blocks that swallowed clicks and sat on the toolbar. */
.bld-insert.eb-insert { height: 0; margin: 0; pointer-events: none; z-index: 7; }
.bld-insert.eb-insert::before { background: var(--eb-teal-500); left: 0; right: 0; }
.bld-insert.eb-insert .bld-insert-btn { pointer-events: auto; }
.bld-block-wrap:hover + .bld-insert.eb-insert::before,
.bld-insert.eb-insert:hover::before, .bld-insert.eb-insert.is-open::before { opacity: 1; }
.bld-block-wrap:hover + .bld-insert.eb-insert .bld-insert-btn { opacity: 1; transform: scale(1); }
.bld-canvas-area.is-dragging .bld-block-wrap:hover + .bld-insert.eb-insert .bld-insert-btn { opacity: 0; }
/* While dragging, the gaps must catch the drop again. */
.bld-canvas-area.is-dragging .bld-insert.eb-insert { height: 14px; margin: -7px 0; pointer-events: auto; }
/* The selected block sits above the gaps, so its label and toolbar always take the click. */
.bld-app .bld-block-wrap:has(> .bld-block.is-selected) { z-index: 8; }
.bld-insert.eb-insert .bld-insert-btn {
  width: auto; height: 24px; padding: 0 10px 0 8px; gap: 4px; border-radius: 999px; opacity: 0; transform: scale(.96);
  border: none; background: var(--eb-teal-500); color: #fff; font: 700 12px/1 'DM Sans', sans-serif; box-shadow: var(--eb-shadow-sm);
}
.bld-insert.eb-insert .bld-insert-btn svg { width: 13px; height: 13px; stroke-width: 2.6; }
.bld-insert.eb-insert:hover .bld-insert-btn, .bld-insert.eb-insert.is-open .bld-insert-btn,
.bld-insert.eb-insert .bld-insert-btn:focus-visible { opacity: 1; transform: scale(1); }
.bld-canvas-area.is-dragging .bld-insert.eb-insert .bld-insert-btn { opacity: 0; }

/* ── Block editor (right) ─────────────────────────────────────────────── */
.eb-settings-wrap { display: flex; flex: none; }
.eb-settings-wrap .bld-settings { width: 340px; border-left: 1px solid var(--eb-s200); background: #fff; }
.bld-app .bld-settings-head { padding: 18px 16px 14px 20px; gap: 12px; border-bottom: 1px solid var(--eb-s100); }
.bld-app .bld-settings-head .bld-set-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--eb-teal-50); color: var(--eb-teal-600); }
.bld-app .bld-settings-head .bld-set-ic svg { width: 18px; height: 18px; }
.eb-set-title { flex: 1; min-width: 0; }
.bld-app .bld-settings-head h2 { font: 700 16px/1.2 'DM Sans', sans-serif; color: var(--eb-s900); }
.bld-app .bld-settings-head .bld-set-sub { font: 400 12px/1.3 'DM Sans', sans-serif; letter-spacing: 0; text-transform: none; color: var(--eb-s500); margin-top: 2px; }
.eb-close { width: 32px; height: 32px; border: none; background: transparent; border-radius: 8px; cursor: pointer; display: grid; place-items: center; color: var(--eb-s500); flex-shrink: 0; }
.eb-close:hover { background: var(--eb-s50); color: var(--eb-s900); }
.eb-close svg { width: 18px; height: 18px; }
.bld-app .bld-settings-body { padding: 18px 20px 32px; gap: 16px; }
.bld-app .bld-settings .bld-field label { font: 500 12px/1.2 'DM Sans', sans-serif; color: var(--eb-s600); }
.bld-app .bld-settings .bld-input { min-height: 42px; border-radius: 10px; font-size: 14px; border-color: var(--eb-s200); }
.bld-app .bld-settings textarea.bld-input { min-height: 96px; }
.bld-app .bld-settings .bld-input:focus { border-color: var(--eb-teal-500); box-shadow: 0 0 0 3px var(--eb-teal-50); }
.bld-app .bld-settings-empty { padding: 72px 28px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.eb-empty-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--eb-s50); display: grid; place-items: center; margin-bottom: 8px; }
.eb-empty-ic svg { margin: 0 !important; width: 22px !important; height: 22px !important; color: var(--eb-s400); }
.bld-app .bld-settings-empty b { font: 700 15px/1.3 'DM Sans', sans-serif; color: var(--eb-s900); }
.bld-app .bld-settings-empty p { font: 400 13px/1.45 'DM Sans', sans-serif; color: var(--eb-s500); }
.eb-set-note { padding: 12px 14px; border-radius: 12px; background: var(--eb-s50); display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.eb-set-note p { margin: 0; font: 400 13px/1.45 'DM Sans', sans-serif; color: var(--eb-s600); }

/* ── Full-screen offer browser ────────────────────────────────────────── */
.eb-browser {
  position: fixed; top: 64px; left: 76px; right: 0; bottom: 0; z-index: 60;
  background: var(--eb-s50); display: flex; flex-direction: column;
  animation: eb-fade 220ms var(--eb-ease);
}
@keyframes eb-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.eb-browser-head { background: #fff; padding: 20px 32px; border-bottom: 1px solid var(--eb-s200); display: flex; flex-direction: column; gap: 16px; flex: none; }
.eb-browser-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.eb-browser-titlebar h2 { margin: 0; font: 700 22px/1.2 'DM Sans', sans-serif; color: var(--eb-s900); }
.eb-browser-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.eb-browser-product { width: 220px; flex: none; }
.eb-browser-search { flex: 1 1 320px; }
.eb-browser-controls .eb-filter { width: 170px; flex: none; }
.eb-browser-controls .eb-filter .eb-select { height: 44px; }
.eb-browser-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 32px 120px; }
.eb-browser-count { padding: 0 0 12px; }
.eb-browser-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.eb-card {
  position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; cursor: pointer; overflow: hidden;
  background: #fff; border: none; border-radius: 14px; box-shadow: var(--eb-shadow-sm); outline: 2px solid transparent; outline-offset: -2px;
  transition: transform 220ms var(--eb-ease), box-shadow 220ms var(--eb-ease), outline-color 120ms; font-family: 'DM Sans', sans-serif;
}
.eb-card:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--eb-shadow-md); }
.eb-card.is-picked { outline-color: var(--eb-teal-500); }
.eb-card:disabled { cursor: default; }
.eb-card-img { position: relative; height: 150px; background: var(--eb-teal-50); display: block; }
.eb-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eb-card-tag { position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: 999px; background: #fff; color: var(--eb-teal-600); font: 700 11px/1 'DM Sans', sans-serif; box-shadow: var(--eb-shadow-sm); }
.eb-card-check {
  position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 8px; background: #fff;
  border: 1px solid var(--eb-s200); display: grid; place-items: center; color: #fff; box-shadow: var(--eb-shadow-sm);
}
.eb-card-check svg { width: 16px; height: 16px; stroke-width: 3; }
.eb-card.is-picked .eb-card-check, .eb-card.is-in .eb-card-check { background: var(--eb-teal-500); border-color: var(--eb-teal-500); }
.eb-card.is-in .eb-card-check { opacity: .5; }
.eb-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.eb-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.eb-card-top b { font: 700 16px/1.25 'DM Sans', sans-serif; color: var(--eb-s900); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eb-card-price { font: 700 16px/1.25 'DM Sans', sans-serif; color: var(--eb-teal-600); white-space: nowrap; }
.eb-card-deal { font: 400 13px/1.4 'DM Sans', sans-serif; color: var(--eb-s700); }
.eb-card-meta { font: 400 12px/1.35 'DM Sans', sans-serif; color: var(--eb-s500); }
.eb-browser-more { margin: 24px auto 0; display: flex; }
.eb-browser-bar {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: flex; align-items: center; gap: 16px; padding: 10px 10px 10px 20px; border-radius: 14px;
  background: var(--eb-s900); color: #fff; box-shadow: var(--eb-shadow-lg); font: 400 14px/1 'DM Sans', sans-serif; white-space: nowrap;
}
.eb-browser-bar b { font-weight: 700; }
.eb-browser-bar .eb-btn--primary:disabled { opacity: .5; }

/* ── Responsive (desktop widths) ──────────────────────────────────────── */
@media (min-width: 768px) {
  /* builder.css's laptop rules slimmed the old sidebar; the panel now sizes itself. */
  .bld-app .bld-sidebar.eb-panel { width: clamp(280px, 26vw, 384px); }
  .bld-app .eb-settings-wrap .bld-settings { width: 340px; }
}
@media (max-width: 1279px) {
  /* Narrower: the editor slides over the canvas, only while a block is selected. */
  .eb-settings-wrap { position: absolute; top: 0; right: 0; bottom: 0; z-index: 30; box-shadow: var(--eb-shadow-lg); }
  .eb-settings-wrap:not(.has-block) { display: none; }
}
@media (max-width: 1199px) {
  .eb-saved { display: none; }
}
@media (max-width: 1099px) {
  .eb-hide-narrow { display: none; }
  .eb-linkbtn--icon { white-space: nowrap; }
  .eb-next-long { display: none; }
  .eb-next-short { display: inline; }
  .eb-device-label { display: none; }
  .eb-topbar { gap: 10px; }
  .eb-sendtest .bld-btn-label { display: none; }
  .eb-sendtest { width: 40px; padding: 0; }
}

/* ── Phones: keep builder.css's drawer, borrow the new rows/buttons ───── */
@media (max-width: 767px) {
  .bld-topbar.eb-topbar { height: calc(56px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 10px 0; gap: 8px; }
  .eb-eyebrow, .eb-device, .eb-sendtest { display: none; }
  .eb-topbar .bld-design-name { width: 100%; font-size: 15px; }
  .eb-title { flex: 1; }
  .bld-drawer .bld-sidebar.eb-panel { width: 100%; overflow: visible; border-right: none; }
  .bld-drawer .eb-scroll { overflow: visible; }
  .eb-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ── Style panel: button shape and background choices ────────────────── */
.eb-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.eb-choices:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.eb-choice {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px;
  border: 1px solid var(--eb-s200); border-radius: 12px; background: #fff; cursor: pointer;
  font: 500 13px/1 'DM Sans', sans-serif; color: var(--eb-s700); transition: border-color 120ms, background 120ms;
}
.eb-choice:hover { border-color: var(--eb-teal-300); }
.eb-choice.is-selected { border-color: var(--eb-teal-500); background: var(--eb-teal-50); color: var(--eb-teal-600); box-shadow: 0 0 0 1px var(--eb-teal-500); }
.eb-shape-sample { width: 54px; height: 20px; background: var(--eb-teal-500); }
.eb-bg-sample { width: 54px; height: 28px; border-radius: 6px; border: 1px solid var(--eb-s200); }

/* The canvas follows the email's style, as email-export.js draws it. */
.bld-mail[data-btn-shape] .em-hero-cta,
.bld-mail[data-btn-shape] .em-offer-cta,
.bld-mail[data-btn-shape] .em-cta-btn,
.bld-mail[data-btn-shape] .em-grid-card-cta,
.bld-mail[data-btn-shape] .em-header-enquire { border-radius: var(--eb-btn-radius) !important; }
.bld-mail[data-mail-bg] .em-header { background: var(--eb-mail-bg); }

/* Header call button (email-export.js .tms-hdr-call): only in the Mobile view,
   where it replaces the written-out number and the social links, as on a phone. */
.em-header-call { display: none; width: 40px; height: 40px; border-radius: 20px; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.em-header-call svg { width: 18px; height: 18px; }
.is-device-mobile .em-header.em-header--bar { padding: 14px 18px; gap: 10px; }
.is-device-mobile .em-header-right { flex-direction: row; align-items: center; gap: 8px; }
.is-device-mobile .em-header-call { display: inline-flex; }
.is-device-mobile .em-header-phone, .is-device-mobile .em-header-socials { display: none; }
.is-device-mobile .em-header-logo { height: auto; max-height: 44px; max-width: 150px; }

/* A panel box marked hidden stays hidden (Jet2's search bar is kept mounted). */
.eb-controls[hidden] { display: none; }

/* "Show a button" on the hero block */
.eb-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font: 500 14px/1.3 'DM Sans', sans-serif; color: var(--eb-s800, #1F2937); }
.eb-check input { width: 18px; height: 18px; accent-color: #0E8A99; margin: 0; cursor: pointer; }
.eb-colour-status { margin: 0 0 12px; }
.eb-colour-sub { display: block; margin: 12px 0 8px; font: 600 11px/1.2 'DM Sans', sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--eb-s500); }
.eb-colour-pick { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.eb-colour-wheel {
  position: relative; width: 40px; height: 40px; border-radius: 12px; cursor: pointer; flex: none;
  background: conic-gradient(#f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  box-shadow: 0 0 0 1px var(--eb-s200); border: 3px solid #fff;
}
.eb-colour-wheel input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.eb-colour-wheel:focus-within { box-shadow: 0 0 0 2px var(--eb-s900); }
.eb-colour-hex {
  width: 110px; height: 40px; border: 1px solid var(--eb-s200); border-radius: 10px; padding: 0 12px;
  font: 500 14px/1 'DM Mono', ui-monospace, monospace; color: var(--eb-s900); text-transform: uppercase;
}
.eb-colour-hex:focus { outline: 2px solid var(--eb-teal-500); outline-offset: 1px; }

/* The Send page (SendPage in app.jsx): the preview sits beside the form on a
   wide screen and is left out on a narrow one, where the form is the job. */
@media (max-width: 900px) {
  .eb-sendpage-preview { display: none; }
  .eb-sendpage-body { padding: 14px !important; }
}

/* Your tags (tms-hub migration 331) — design "Email builder: add offers by tag", 2a */
.eb-tagchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.eb-tagchip { display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1 'DM Sans', sans-serif; padding: 7px 12px; border-radius: 999px; border: 1px solid #D5D8DF; background: #fff; color: #334155; cursor: pointer; }
.eb-tagchip:hover { border-color: #0E8A99; }
.eb-tagchip.is-on { background: #0E8A99; border-color: #0E8A99; color: #fff; }
.eb-tagchip-n { font-size: 12px; opacity: .75; }
.eb-tagbanner { margin: 0 16px 12px; padding: 12px 14px; background: #E6F5F6; border: 1px solid #C5EAEE; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 400 14px/1.35 'DM Sans', sans-serif; color: #0E4A53; }
.eb-tagbanner .eb-btn { white-space: nowrap; }
.eb-tagbanner .eb-btn:disabled { background: #636C87; opacity: 1; }
.eb-row-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.eb-row-tag { font: 400 11px/1.4 'DM Sans', sans-serif; color: #4B5468; background: #F0F1F4; border-radius: 999px; padding: 2px 8px; }
.eb-row--card { border: 1px solid #D5D8DF; background: #fff; margin: 0 0 10px; }
.eb-row--card.is-added { border-color: #0E8A99; }
.eb-tagbanner .eb-btn--primary { background: #0E8A99; color: #fff; }
.eb-tagfoot { padding: 12px 20px; border-top: 1px solid #D5D8DF; font: 400 14px/1.3 'DM Sans', sans-serif; color: #334155; }
.eb-tagfoot strong { color: #0F1C31; }
.eb-muted { margin: 8px; font: 400 13px/1.4 'DM Sans', sans-serif; color: var(--eb-s500, #636C87); }

/* Tag search: a "Find a tag" box once there are more than 8 tags, and an
   agent's own tags on every product (they open "Your offers"). */
.eb-tagwrap { margin-top: 10px; }
.eb-tagwrap .eb-tagchips { margin-top: 8px; }
.eb-tagwrap > .eb-tagchips:first-child { margin-top: 0; }
.eb-tagfind { width: 100%; box-sizing: border-box; font: 400 13px/1.2 'DM Sans', sans-serif; padding: 8px 10px; border: 1px solid #D5D8DF; border-radius: 8px; background: #fff; color: #334155; }
.eb-tagfind:focus { outline: 2px solid #0E8A99; outline-offset: 1px; border-color: #0E8A99; }
.eb-tagjump { margin-top: 10px; }
.eb-tagjump-label { display: block; font: 600 12px/1 'DM Sans', sans-serif; color: #64748B; text-transform: uppercase; letter-spacing: .04em; }
.eb-tagjump .eb-tagwrap { margin-top: 6px; }

/* Text colour on a dark background (Style panel, Dec 2026): the words drawn
   straight on the email's background, as email-export.js inkWords swaps them.
   Hero, call to action, social, countdown and footer keep their own colours;
   holiday cards keep dark words on a white card (email-export.js onWhiteCard). */
.bld-mail[data-ink] .em-header h1,
.bld-mail[data-ink] .em-text strong { color: var(--eb-ink-head) !important; }
.bld-mail[data-ink] .em-text,
.bld-mail[data-ink] .em-text p { color: var(--eb-ink-body) !important; }
.bld-mail[data-ink] .em-header-tagline,
.bld-mail[data-ink] .em-header-socials a { color: var(--eb-ink-muted) !important; }
.bld-mail[data-ink] .em-text a { color: var(--eb-ink-head) !important; }
.bld-mail[data-ink] .em-grid { background: #fff; border-radius: 14px; margin: 12px 16px; }
.bld-mail[data-ink] .em-split { background: #fff; border-radius: 14px; margin: 12px 16px; }

/* ── Email style panel ── */
.es { font-family: 'DM Sans', var(--font-body, sans-serif); color: #334155; }
.es-intro { padding: 4px 0 16px; }
.es-intro h2 { margin: 0; font-size: 20px; font-weight: 700; color: #0F1C31; }
.es-intro p { margin: 4px 0 0; font-size: 14px; color: #636C87; }
.es-brand { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid #D5D8DF; border-radius: 14px; background: #F7F8FA; margin-bottom: 4px; }
.es-brand-logo { flex: none; width: 40px; height: 40px; border-radius: 50%; background: #0A6E7E; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; overflow: hidden; }
.es-brand-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.es-brand-text { flex: 1; min-width: 0; display: grid; font-size: 13px; line-height: 1.4; color: #636C87; }
.es-brand-text b { font-size: 14px; color: #0F1C31; }
.es-link, .es-notice a { color: #0E8A99; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.es-link:hover, .es-notice a:hover { color: #0A6E7E; }
.es-section { padding: 20px 0; border-top: 1px solid #E7E9EE; display: grid; gap: 10px; }
.es-section:first-of-type { border-top: 0; }
.es-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.es-section-head h3 { margin: 0; font-size: 15px; font-weight: 700; color: #0F1C31; }
.es-summary { font-size: 13px; color: #636C87; text-align: right; }
.es-notice { margin: 0; padding: 10px 12px; border-radius: 10px; background: #FDF3D6; font-size: 13px; line-height: 1.45; color: #334155; }
.es-label { display: block; font-size: 13px; font-weight: 500; color: #0F1C31; }
.es-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 4px; }
.es-hint { font-size: 12px; color: #636C87; }
.es-hint.is-warn { color: #B45309; }
.es-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.es-swatch { width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; box-shadow: 0 0 0 1px #D5D8DF; display: inline-flex; align-items: center; justify-content: center; }
.es-swatch.is-on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0F1C31; }
.es-swatch svg { width: 16px; height: 16px; }
.es-pill { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px dashed #B9BFCC; background: #fff; font: 500 13px 'DM Sans', sans-serif; color: #334155; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.es-pill--match { border-style: solid; }
.es-pill.is-on { border: 2px solid #0F1C31; }
.es-dot { width: 20px; height: 20px; border-radius: 50%; display: inline-block; }
.es-hex { display: flex; gap: 8px; align-items: center; }
.es-hex input[type="color"] { width: 40px; height: 40px; padding: 2px; border: 1px solid #D5D8DF; border-radius: 10px; background: #fff; cursor: pointer; }
.es-hex-text { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid #D5D8DF; border-radius: 10px; font: 400 14px 'DM Mono', ui-monospace, monospace; color: #0F1C31; text-transform: uppercase; }
.es-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: #E7E9EE; }
.es-seg-btn { height: 40px; border: 0; border-radius: 9px; background: transparent; font: 500 13px 'DM Sans', sans-serif; color: #636C87; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.es-seg-btn.is-on { background: #fff; color: #0F1C31; box-shadow: 0 1px 2px rgba(15,28,49,0.12); }
.es-shape { width: 18px; height: 10px; background: currentColor; display: inline-block; }
.es-ink { width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 1px #B9BFCC; display: inline-block; }
.es-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.es-tile { min-height: 72px; border: 1px solid #D5D8DF; border-radius: 14px; background: #fff; display: grid; justify-items: center; align-content: center; gap: 8px; font: 500 13px 'DM Sans', sans-serif; color: #334155; cursor: pointer; padding: 8px 4px; }
.es-tile.is-on { border: 2px solid #0E8A99; }
.es-tile-dot { width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 0 0 1px #D5D8DF; }
.es-tile-dot--wheel { background: conic-gradient(#E37A55, #FFD23F, #2F7D4F, #0E8A99, #1F5F8B, #8B5CF6, #E37A55); box-shadow: none; }
.es-foot { padding: 20px 0 8px; border-top: 1px solid #E7E9EE; }
.es-reset { border: 0; background: none; padding: 0; font: 500 13px 'DM Sans', sans-serif; color: #334155; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.es-reset:hover { color: #0F1C31; }
.es button:focus-visible, .es a:focus-visible, .es input:focus-visible { outline: 2px solid #0E8A99; outline-offset: 2px; }
