/* Change these shared values for all current and future Astra tools. */
@font-face {
  font-family: 'Astra UI Montserrat';
  src: url('fonts/montserrat-400.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Astra UI Montserrat';
  src: url('fonts/montserrat-700.ttf') format('truetype');
  font-weight: 500 900;
  font-style: normal;
  font-display: swap;
}
:root, [data-astra-ui-scope] {
  --astra-ui-width: 1400px;
  --astra-ui-font: 'Astra UI Montserrat', 'Montserrat', Arial, sans-serif;
  --astra-ui-text: 14px;
  --astra-ui-h2: 22px;
  --astra-ui-accent: #395fc6;
  --astra-ui-accent-hover: #2e4fa9;
  --astra-ui-ink: #253457;
  --astra-ui-muted: #677595;
  --astra-ui-border: #d5ddeb;
  --astra-ui-background: #f5f7fb;
  --astra-ui-soft: #eaf0fa;
}

/* Host page: use available content width, up to the site's 1400 px. */
body.astra-ui-page :is(.site-content, .site-content-inner) {
  width: 100%; max-width: var(--astra-ui-width) !important;
  margin-left: auto; margin-right: auto;
}
body.astra-ui-page .content-area { width: 100%; max-width: none; float: none; }
body.astra-ui-page .widget-area { display: none; }
body.astra-ui-page .entry-content > :is(.astra-stand-embed, .astra-auto-glass-embed, .astra-sticker-frame, #astra-ip-stamp-root, .astra-ui) {
  width: 100%; max-width: var(--astra-ui-width) !important; margin-left: auto; margin-right: auto;
}
body.astra-ui-page :is(.astra-stand-embed, .astra-auto-glass-embed) { max-width: var(--astra-ui-width) !important; }
body.astra-ui-page .astra-stand-frame { min-height: 0; }

/* Typography applies to HTML controls, never SVG artwork or text-edit overlays. */
[data-astra-ui-scope] {
  font-family: var(--astra-ui-font) !important;
  font-size: var(--astra-ui-text) !important;
  color: var(--astra-ui-ink);
  --accent: var(--astra-ui-accent);
  --ink: var(--astra-ui-ink);
  --muted: var(--astra-ui-muted);
  --border: var(--astra-ui-border);
  --line: var(--astra-ui-border);
  --soft: var(--astra-ui-background);
  --bg: var(--astra-ui-background);
  --lime: #dce6fc;
}
[data-astra-ui-scope][data-astra-ui-scope] :where(*):not(:where(svg, svg *, canvas, #inlineText, #inlineText *, [data-astra-ui-artwork], [data-astra-ui-artwork] *)) {
  font-family: var(--astra-ui-font) !important;
  font-synthesis: weight style;
}
[data-astra-ui-scope][data-astra-ui-scope] :where(*):not(:where(svg, svg *, canvas, #inlineText, #inlineText *, [data-astra-ui-artwork], [data-astra-ui-artwork] *, h1, h2, h3, h4, h5, h6, .total, .summary-size, .summary-size *, .price strong, .order-bar-total strong, .brand-icon)) {
  font-size: var(--astra-ui-text) !important;
}
[data-astra-ui-scope][data-astra-ui-scope] h2 {
  font-size: var(--astra-ui-h2) !important; line-height: 1.3 !important;
  font-weight: 700; letter-spacing: normal !important; color: var(--astra-ui-ink);
  overflow-wrap: anywhere;
}
[data-astra-ui-scope] :is(p, label, legend, dt, dd, small, li) { line-height: 1.5; }
[data-astra-ui-scope] :is(button, input, select, textarea) { line-height: 1.4; }
[data-astra-ui-scope] :is(.section-title, .catalog-head, .catalog-tools) { flex-wrap: wrap; gap: 12px; }
[data-astra-ui-scope] :is(.step, .section-title > span:first-child, .layout-help) { flex-shrink: 0; }
[data-astra-ui-scope] :is(.workspace > *, .editor > *, .field-grid > *, .fields > *) { min-width: 0; }
[data-astra-ui-scope] :is(input:not([type=radio]):not([type=checkbox]):not([type=range]):not([type=color]), select, textarea) {
  border-color: var(--astra-ui-border) !important;
  background-color: #fcfdff !important; color: var(--astra-ui-ink) !important;
}
[data-astra-ui-scope] :is(input, button, select, textarea):focus-visible {
  outline-color: #8ba5ed !important;
}
[data-astra-ui-scope] input:is([type=radio], [type=checkbox], [type=range]) { accent-color: var(--astra-ui-accent) !important; }

/* Shared surfaces and palette, using the site menu blue. */
body[data-astra-ui-scope] { background: var(--astra-ui-background) !important; }
[data-astra-ui-scope] :is(.panel, .summary, .artwork-upload, .catalog, .holder-section, .glass-start, .side-choice, .material-choice label, .editor, .workspace > form) {
  border-color: var(--astra-ui-border) !important; background-color: #fff !important;
}
[data-astra-ui-scope] :is(.hint, .help, .export-note, .unit, .section-description, .selected-caption, .palette-note, .fit-content-note, .background-note, .pocket-fill-note, .summary-item, .keyboard-hint, .file-label, .canvas-hint, .scene-foot, .scene-caption) {
  color: var(--astra-ui-muted) !important;
}
[data-astra-ui-scope] :is(label, legend, .color-row, .title-size-row, .font-family-field, .title-style-row, .element-text-label, .pocket-fill-option, .number-wrap span, .summary-size small, .summary-item strong, .page-footer, .page-footer > button, .horizontal-dimension, .vertical-dimension, .pocket-card small) { color: var(--astra-ui-muted) !important; }
[data-astra-ui-scope] :is(.segmented, .preset-row button, .help-card, .validation-status, .recommendation, .layout-help, .layout-tooltip) { background-color: #f0f4fc !important; border-color: var(--astra-ui-border) !important; color: #52678e !important; }
[data-astra-ui-scope] :is(.layout-icon, .help-number) { color: #6e88bd !important; }
[data-astra-ui-scope] .switch-row input:checked + .switch { background-color: var(--astra-ui-accent) !important; }
[data-astra-ui-scope] :is(.preview-panel, .canvas-toolbar, .canvas-bottom, .canvas-top, .page-footer, .preview) {
  background-color: var(--astra-ui-soft) !important; border-color: var(--astra-ui-border) !important;
}
[data-astra-ui-scope] :is(.primary, .btn.dark, .order-bar button, .styles button.active, .dialog-apply, .edit-layout, .order-send, .holder-filters button.active, .holder-card.selected .holder-check, #inlineToolbar button.active) {
  background: var(--astra-ui-accent) !important; border-color: var(--astra-ui-accent) !important; color: #fff !important;
}
[data-astra-ui-scope] :is(.primary, .btn.dark, .order-bar button, .dialog-apply, .edit-layout, .order-send):hover {
  background: var(--astra-ui-accent-hover) !important; color: #fff !important;
}
[data-astra-ui-scope] :is(.btn.outline, .btn.quiet, .reset-title-btn, .canvas-bottom .align-btn) {
  border-color: var(--astra-ui-border) !important; background-color: #f5f7fc !important; color: #42567d !important;
}
[data-astra-ui-scope] :is(.btn.outline, .btn.quiet):hover { background-color: #e7edfa !important; }
[data-astra-ui-scope] :is(.presets button.active, .preset-row button.active, .shape.selected, .layer.active, .tabs button.active, .segmented button.active, .segmented [aria-selected=true], .material:has(input:checked), .material-choice label:has(input:checked)) {
  background-color: #eaf0fd !important; border-color: #8ba5ed !important; color: #2c477b !important;
}
[data-astra-ui-scope] .material:has(input:checked) b { background: var(--astra-ui-accent) !important; border-color: #dce6fc !important; }
[data-astra-ui-scope] :is(.green-dot, .live-dot, .saved-dot, .live i) { background-color: var(--astra-ui-accent) !important; }
[data-astra-ui-scope] :is(.glass-switch input:checked + span, .side-choice input:checked + span) { background: var(--astra-ui-accent) !important; color: white !important; border-color: var(--astra-ui-accent) !important; }
[data-astra-ui-scope] .icon-btn.active { background-color: #e0e8fc !important; color: #395fc6 !important; }
[data-astra-ui-scope] :is(.template-card.selected, .holder-card.selected, .holder-color[aria-pressed=true]) { border-color: var(--astra-ui-accent) !important; }
[data-astra-ui-scope] :is(.template-card.selected, .holder-color[aria-pressed=true]) { background-color: #edf2ff !important; }
[data-astra-ui-scope] :is(.holder-price, .holder-selection > span:last-child, .order-grand-total strong, .lookup-result) { color: var(--astra-ui-accent) !important; }
[data-astra-ui-scope] :is(.data-instruction, .show-all-holders) { color: #395fc6 !important; background-color: #f1f5ff !important; border-color: #c5d3f3 !important; }
[data-astra-ui-scope] .type-settings input[type=range]::-webkit-slider-thumb { background-color: var(--astra-ui-accent) !important; }
[data-astra-ui-scope] .type-settings input[type=range]::-moz-range-thumb { background-color: var(--astra-ui-accent) !important; }

/* Inner layouts occupy the full space supplied by WordPress. */
[data-astra-ui-scope] > main,
[data-astra-ui-scope].astra-app > main {
  width: 100%; max-width: var(--astra-ui-width) !important;
  margin: 0 auto !important; box-sizing: border-box;
}
[data-astra-ui-scope=stickers] > main { padding: 8px !important; }
[data-astra-ui-scope=stickers] .summary-top { flex-wrap: wrap; gap: 8px; letter-spacing: normal; }
[data-astra-ui-scope=stickers] .layout-options .material { min-height: 110px; }
[data-astra-ui-scope=stickers] .layout-help { width: 28px; height: 28px; }
[data-astra-ui-scope=glass] > main { padding: 20px 16px 0 !important; }
[data-astra-ui-scope=glass] .glass-start .glass-switch { width: min(100%, 420px); }
[data-astra-ui-scope=glass] .glass-start { flex-wrap: wrap; }
[data-astra-ui-scope=glass] .glass-switch { grid-template-columns: repeat(3, minmax(0,1fr)); }
[data-astra-ui-scope=glass] .glass-switch span { white-space: normal; }
[data-astra-ui-scope=glass] .dimension-height { width: 70px; }
[data-astra-ui-scope=glass] .dimension-height input[type=number] { width: 70px; }
[data-astra-ui-scope=glass] .scene { padding-right: 86px; }
[data-astra-ui-scope=glass] .dimension-width { margin-top: 0; }
[data-astra-ui-scope=stamp] > main { padding: 0 !important; }
[data-astra-ui-scope=stamp] .order-bar-inner { max-width: var(--astra-ui-width) !important; }
[data-astra-ui-scope=stamp] .order-bar.is-docked { background: linear-gradient(135deg,#eef3ff,#f5f7fc) !important; border-color: #c5d3f3 !important; }
[data-astra-ui-scope=stamp] :is(.order-bar-heading, .order-bar-total strong, #orderBarPreviewLabel) { color: #2c477b !important; }
[data-astra-ui-scope=stamp] :is(.lookup-panel, .entry-choice.selected-method) { background-color: #f1f5ff !important; border-color: #c5d3f3 !important; }
[data-astra-ui-scope=stamp] :is(.lookup-choice button:enabled, .lookup-result) { border-color: var(--astra-ui-accent) !important; }
[data-astra-ui-scope=stamp] .lookup-choice button:enabled { background-color: var(--astra-ui-accent) !important; }
[data-astra-ui-scope=stamp] :is(.lookup-status, .order-bar-check) { color: var(--astra-ui-accent) !important; }
[data-astra-ui-scope=stamp] .holder-grid { grid-template-columns: repeat(6, minmax(0,1fr)); }

/* Stand: remove duplicate branding, retain import/export as working controls. */
[data-astra-ui-scope=stand] > .topbar,
[data-astra-ui-scope=stand] > main > .page-heading { display: none !important; }
[data-astra-ui-scope=stand] > main { padding: 12px !important; }
[data-astra-ui-scope=stand] .astra-ui-stand-actions { display: flex; justify-content: flex-end; padding-bottom: 12px; }
[data-astra-ui-scope=stand] .astra-ui-stand-actions .top-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
[data-astra-ui-scope=stand] .editor {
  display: grid; grid-template-columns: 290px minmax(0, 1fr) 300px;
  height: 800px !important; min-height: 680px; max-height: none !important;
}
[data-astra-ui-scope=stand] :is(.left-panel, .right-panel) { min-width: 0; overflow-y: auto; }
[data-astra-ui-scope=stand] :is(.panel-section, .inspector-section, .summary-section) { padding: 20px 16px; }
[data-astra-ui-scope=stand] :is(.btn, .preset-row button, .pocket-card small, .empty-hint) { white-space: normal; }
[data-astra-ui-scope=stand] .preset-row { display: flex; flex-wrap: wrap; gap: 6px; }
[data-astra-ui-scope=stand] .preset-row button { flex: 1 1 72px; }
[data-astra-ui-scope=stand] :is(.canvas-toolbar, .canvas-bottom) { height: auto; min-height: 54px; padding: 10px; flex-wrap: wrap; gap: 8px; }
[data-astra-ui-scope=stand] .canvas-viewport { background-color: #f1f4fa !important; min-height: 320px; }
[data-astra-ui-scope=stand] .number-wrap input { padding-right: 32px; }
[data-astra-ui-scope=stand] .number-wrap span { right: 6px; }
[data-astra-ui-scope=stand] .title-size-row { flex-wrap: wrap; }
[data-astra-ui-scope=stand] .page-footer { flex-wrap: wrap; padding: 14px 12px; }

@media (min-width: 901px) {
  [data-astra-ui-scope=stickers] .workspace { grid-template-columns: minmax(0,1fr) 370px; gap: 24px; }
  [data-astra-ui-scope=glass] .workspace { grid-template-columns: 350px minmax(0,1fr); gap: 24px; }
}
@media (max-width: 1100px) {
  [data-astra-ui-scope=stand] .editor { grid-template-columns: 260px minmax(0,1fr); height: auto !important; }
  [data-astra-ui-scope=stand] .right-panel { grid-column: 1/-1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); overflow: visible; }
  [data-astra-ui-scope=stand] .workspace[aria-label="Рабочее поле"] { min-height: 540px; }
  [data-astra-ui-scope=stand] .left-panel { max-height: 800px; }
}
@media (max-width: 900px) {
  [data-astra-ui-scope=stickers] .workspace,
  [data-astra-ui-scope=glass] .workspace { display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; }
  [data-astra-ui-scope=glass] .panel { order: 0; width: 100%; }
  [data-astra-ui-scope=glass] .editor { order: 1; width: 100%; }
}
@media (max-width: 760px) {
  [data-astra-ui-scope=stamp] .holder-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  [data-astra-ui-scope=stamp] .fields { grid-template-columns: minmax(0,1fr); }
  [data-astra-ui-scope=stamp] .catalog-controls { flex-wrap: wrap; }
  [data-astra-ui-scope=stamp] .editor { padding: 22px 16px; }
  [data-astra-ui-scope=stamp] .order-bar { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 640px) {
  [data-astra-ui-scope=stand] .editor { display: flex; flex-direction: column; min-height: 0; }
  [data-astra-ui-scope=stand] :is(.left-panel, .right-panel) { display: block; max-height: none; overflow: visible; width: 100%; }
  [data-astra-ui-scope=stand] .workspace[aria-label="Рабочее поле"] { min-height: 440px; width: 100%; }
  [data-astra-ui-scope=stand] .astra-ui-stand-actions .btn { flex: 1; }
  [data-astra-ui-scope=stand] .astra-ui-stand-actions .top-actions { width: 100%; }
  [data-astra-ui-scope=stand] .astra-ui-stand-actions :is(#import-btn span, .desktop-word) { display: inline; }
  [data-astra-ui-scope=stand] .keyboard-hint { flex-wrap: wrap; }
  [data-astra-ui-scope=stickers] .field-grid { grid-template-columns: minmax(0,1fr); }
  [data-astra-ui-scope=stickers] .layout-options { grid-template-columns: minmax(0,1fr); }
  [data-astra-ui-scope=stickers] .presets { grid-template-columns: repeat(2,minmax(0,1fr)); }
  [data-astra-ui-scope=glass] > main { padding: 12px 8px 0 !important; }
  [data-astra-ui-scope=glass] .scene { padding-right: 74px; }
  [data-astra-ui-scope=glass] .dimension-height { right: 4px; }
  [data-astra-ui-scope=glass] .dimension-height input[type=number] { width: 64px; }
  [data-astra-ui-scope=glass] .canvas-top { flex-wrap: wrap; gap: 8px; letter-spacing: normal; }
  [data-astra-ui-scope=glass] .scene-foot span { display: inline-block; }
}
