/* Atmosphere overlay modal layout (load last; overrides flex centering) */
#atmosphereModal .axm-atmo-modal-dialog {
 --bs-modal-width: 85vw;
 width: 85vw !important;
 max-width: 85vw !important;
}
#atmosphereModal .axm-atmo-modal-dialog.modal-dialog-centered {
 display: flex;
 align-items: center;
 min-height: calc(100% - var(--bs-modal-margin) * 2);
}
#atmosphereModal .axm-atmo-modal-content {
 display: flex !important;
 flex-direction: column !important;
 align-items: stretch !important;
 justify-content: flex-start !important;
 width: 100%;
 min-height: 75vh !important;
 max-height: 80vh !important;
 height: 75vh;
 overflow: hidden !important;
}
#atmosphereModal .axm-atmo-modal-header {
 flex: 0 0 auto !important;
}
#atmosphereModal .axm-atmo-modal-body {
 flex: 1 1 auto !important;
 min-height: 0 !important;
 display: flex !important;
 flex-direction: column !important;
 overflow: hidden !important;
 padding: 0 !important;
}
#atmosphereModal .axm-atmo-modal-footer {
 flex: 0 0 auto !important;
 display: flex !important;
 justify-content: flex-end !important;
 align-items: center !important;
 padding: 0.65rem 1rem !important;
 border-top: 1px solid var(--axm-border, #30363d) !important;
 background: var(--axm-surface, #1a2332) !important;
}
#atmosphereModal .axm-atmo-apply-btn--footer {
 width: auto !important;
 min-width: 120px !important;
 padding: 0.45rem 1.25rem !important;
}
#atmosphereModal .axm-atmo-layout {
 display: flex !important;
 flex-direction: row !important;
 align-items: stretch !important;
 width: 100% !important;
 height: 100% !important;
 min-height: 0 !important;
 overflow: hidden !important;
}
#atmosphereModal .axm-atmo-sidebar-col {
 position: relative !important;
 flex: 0 0 260px !important;
 width: 260px !important;
 min-width: 260px !important;
 max-width: 260px !important;
 display: flex !important;
 flex-direction: column !important;
 min-height: 0 !important;
 overflow: hidden !important;
 padding: 0.85rem 0.85rem 0.85rem 0.9rem !important;
 border-right: 1px solid var(--axm-border, #30363d) !important;
 gap: 0.65rem !important;
}
#atmosphereModal .axm-atmo-sidebar-body {
 flex: 1 1 auto !important;
 min-height: 0 !important;
 display: grid !important;
 grid-template-rows: minmax(0, 1fr) !important;
 overflow: hidden !important;
}
#atmosphereModal .axm-atmo-categories-top {
 grid-row: 1 !important;
 min-height: 0 !important;
 overflow-y: auto !important;
}
/* Preview box is out of grid flow (desktop): absolutely positioned against
 .axm-atmo-sidebar-col and vertically aligned to the active list row by
 positionPreview() in assets/js/atmosphere-library.module.js, which sets the
 inline `top`. NOTE: do not add an !important `top` here or it would override
 the JS-set inline style. left/right mirror the column padding so the box
 keeps its former width inside the padded sidebar. */
#atmosphereModal .axm-atmo-sidebar-preview {
 position: absolute !important;
 left: 0.9rem !important;
 right: 0.85rem !important;
 display: none !important;
 z-index: 5 !important;
}
#atmosphereModal .axm-atmo-sidebar-preview.is-active {
 display: block !important;
}
#atmosphereModal .axm-atmo-sidebar-preview .axm-atmo-preview-wrap {
 width: 100% !important;
 height: 140px !important;
}
#atmosphereModal .axm-atmo-list-col {
 flex: 1 1 auto !important;
 min-width: 0 !important;
 min-height: 0 !important;
 display: flex !important;
 flex-direction: column !important;
 overflow: hidden !important;
 padding: 0.85rem 0.85rem 0.85rem 0.65rem !important;
}
#atmosphereModal .axm-atmo-list {
 flex: 1 1 auto !important;
 min-height: 0 !important;
 height: 100% !important;
 overflow-y: auto !important;
 overflow-x: hidden !important;
 display: flex !important;
 flex-direction: column !important;
 justify-content: flex-start !important;
 align-items: stretch !important;
 align-content: flex-start !important;
}
#atmosphereModal .axm-atmo-preview-wrap {
 position: relative !important;
 width: 100% !important;
 overflow: hidden !important;
 background: #0d1117 !important;
 border-radius: 8px !important;
 border: 1px solid var(--axm-border, #30363d) !important;
}
#atmosphereModal .axm-atmo-preview-stage {
 position: relative !important;
 width: 100% !important;
 height: 100% !important;
 display: flex !important;
 align-items: center !important;
 justify-content: center !important;
 overflow: hidden !important;
 background: #0d1117 !important;
}
#atmosphereModal .axm-atmo-preview-placeholder.is-hidden {
 display: none !important;
}
#atmosphereModal .axm-atmo-preview-video {
 display: none !important;
}
#atmosphereModal .axm-atmo-preview-video.is-active {
 display: block !important;
 position: absolute !important;
 inset: 0 !important;
 width: 100% !important;
 height: 100% !important;
 max-width: 100% !important;
 max-height: 100% !important;
 margin: 0 !important;
 object-fit: contain !important;
 object-position: center center !important;
 background: transparent !important;
 z-index: 2 !important;
}
#atmosphereModal .axm-atmo-preview-placeholder {
 position: absolute !important;
 inset: 0 !important;
 display: flex !important;
 flex-direction: column !important;
 align-items: center !important;
 justify-content: center !important;
 gap: 0.35rem !important;
 padding: 0.5rem !important;
 text-align: center !important;
 color: var(--axm-text-muted, #8b949e) !important;
 font-size: 0.72rem !important;
 z-index: 1 !important;
}
@media (max-width: 767.98px) {
 #atmosphereModal .axm-atmo-layout {
 flex-direction: column !important;
 }
 #atmosphereModal .axm-atmo-sidebar-col {
 flex: 0 0 auto !important;
 width: 100% !important;
 min-width: 0 !important;
 max-width: none !important;
 max-height: 42vh !important;
 border-right: none !important;
 border-bottom: 1px solid var(--axm-border, #30363d) !important;
 }
 /* Mobile: stacked layout restore the preview to normal grid flow below the
 categories (position:static ignores the JS-set inline top/left/right). */
 #atmosphereModal .axm-atmo-sidebar-body {
 grid-template-rows: minmax(0, 1fr) auto !important;
 }
 #atmosphereModal .axm-atmo-sidebar-preview {
 position: static !important;
 grid-row: 2 !important;
 }
 #atmosphereModal .axm-atmo-list-col {
 flex: 1 1 auto !important;
 min-height: 0 !important;
 }
}

/* ============================================================
 * ATMOSPHERE RESTYLE 2026-09-20 v9 - Select Atmosphere Overlay popup (append-only)
 * Narrower popup, floating preview beside it, icons on the categories, one orange
 * accent (outline + soft pulse when selected, outline + glow on Apply). Dark and light.
 * Also: the Visual Effects panel controls (Atmosphere Select, depth arrows, gear) use orange, not blue.
 * Also: the Choose A Video Format popup (compact layout; toolbar is built by video-explorer.js).
 * Also: the Create Branding Guide popup and the Upload tab and guide controls in the Generate Script form.
 * Also: the header of the Advanced Ad Creator popup (its body is restyled inside custom-image-module-v2/index.php).
 * Also: the Select Voices / Audio Results panel (buttons, links, chevron and the audio player).
 * Also: the Image Composition panel (Add Image icon row with the Opacity slider beside it, Position & Size, More tools).
 * ROLLBACK: delete from this comment to the end of the file.
 * ============================================================ */
@keyframes axm-atmo-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0); }
  50%      { box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2); }
}
@keyframes axm-atmo-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0), 0 0 6px rgba(234, 88, 12, 0.25); }
  50%      { box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.14), 0 0 18px rgba(234, 88, 12, 0.45); }
}
@keyframes axm-atmo-preview-in {
  0%   { opacity: 0; transform: translateX(-8px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* 1. Size (desktop): 780px wide, capped height */
@media (min-width: 768px) {
  #atmosphereModal .axm-atmo-modal-dialog {
    --bs-modal-width: 780px;
    width: 780px !important;
    max-width: calc(100vw - 32px) !important;
    transition: transform 0.3s ease-out, translate 0.28s ease;
  }
  #atmosphereModal .axm-atmo-modal-content {
    height: min(620px, 86vh) !important;
    min-height: 0 !important;
    max-height: none !important;
    border-radius: 16px !important;
  }
  #atmosphereModal .axm-atmo-sidebar-col {
    flex: 0 0 216px !important;
    width: 216px !important;
    min-width: 216px !important;
    max-width: 216px !important;
    padding: 16px 16px 16px 20px !important;
    gap: 14px !important;
  }
  #atmosphereModal .axm-atmo-list-col {
    padding: 12px 12px 12px 16px !important;
  }
}
#atmosphereModal .axm-atmo-modal-header {
  min-height: 64px;
  padding: 0 12px 0 24px !important;
  align-items: center !important;
}
#atmosphereModal .axm-atmo-modal-header .modal-title {
  font-size: 18px;
  font-weight: 600;
}
#atmosphereModal .axm-atmo-modal-footer {
  min-height: 76px;
  padding: 0 24px !important;
}

/* 2. Category icons (Font Awesome; same icons as the rows) */
#atmosphereModal .axm-atmo-categories button.list-group-item::before {
  content: "\f5fd";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 14px;
  width: 16px;
  flex: 0 0 16px;
  text-align: center;
}
#atmosphereModal .axm-atmo-categories button[data-atmo-cat="Atmosphere"]::before { content: "\f0c2"; }
#atmosphereModal .axm-atmo-categories button[data-atmo-cat="Cinematic"]::before  { content: "\f008"; }
#atmosphereModal .axm-atmo-categories button[data-atmo-cat="Fx"]::before         { content: "\f0e7"; }
#atmosphereModal .axm-atmo-categories button[data-atmo-cat="Medical"]::before    { content: "\f21e"; }
#atmosphereModal .axm-atmo-categories button[data-atmo-cat="Retail"]::before     { content: "\f290"; }
#atmosphereModal .axm-atmo-categories button[data-atmo-cat="Tech"]::before       { content: "\f2db"; }
#atmosphereModal .axm-atmo-categories button[data-atmo-cat="Weather"]::before    { content: "\f743"; }
#atmosphereModal .axm-atmo-categories button[data-atmo-cat="General"]::before    { content: "\f5fd"; }
#atmosphereModal .axm-atmo-categories button[data-atmo-cat="all"]::before        { content: "\f5fd"; }

/* 3. The "Clear effect" row and the row tags are removed (Clear All Effects covers it) */
#atmosphereModal .axm-atmo-row--clear,
#atmosphereModal .axm-atmo-row-cat {
  display: none !important;
}

/* 4. Preview: a floating card beside the popup (wide screens). Under 1200px it stays where it was.
 *    The popup shifts left while the preview is showing so the pair stays centered. */
@media (min-width: 1200px) {
  /* Every box between the preview and the dialog must be unpositioned, otherwise the preview is
     placed against (and clipped by) that box. Bootstrap makes .modal-body position: relative. */
  #atmosphereModal .axm-atmo-modal-content,
  #atmosphereModal .axm-atmo-modal-body,
  #atmosphereModal .axm-atmo-layout,
  #atmosphereModal .axm-atmo-sidebar-col,
  #atmosphereModal .axm-atmo-sidebar-body {
    position: static !important;
  }
  #atmosphereModal .axm-atmo-sidebar-preview {
    left: calc(100% + 16px) !important;
    right: auto !important;
    width: 340px !important;
    top: calc(50% - min(620px, 86vh) / 2 + 64px) !important;
    box-sizing: border-box;
    padding: 12px;
    border-radius: 16px;
  }
  #atmosphereModal .axm-atmo-sidebar-preview .axm-atmo-preview-wrap {
    height: auto !important;
    aspect-ratio: 16 / 9;
    border-radius: 10px !important;
  }
  #atmosphereModal:has(.axm-atmo-sidebar-preview.is-active) .axm-atmo-modal-dialog {
    translate: -178px 0;
  }
}
@media (min-width: 1200px) and (prefers-reduced-motion: no-preference) {
  #atmosphereModal .axm-atmo-sidebar-preview.is-active {
    animation: axm-atmo-preview-in 0.28s ease-out;
  }
}

/* 5. Dark theme */
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-modal-content {
  background: var(--axm-modal-bg, #1a222c) !important;
  border: 1px solid var(--axm-border, #2c3846) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-modal-header {
  background: transparent !important;
  border-bottom: 1px solid var(--axm-border, #2c3846) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-modal-header .modal-title {
  color: var(--axm-text, #e6edf3) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-modal-footer {
  background: transparent !important;
  border-top: 1px solid var(--axm-border, #2c3846) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-sidebar-col {
  border-right: 1px solid var(--axm-border, #2c3846) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-search {
  height: 40px;
  background: transparent !important;
  border: 1px solid var(--axm-border, #2c3846) !important;
  border-radius: 8px !important;
  color: var(--axm-text, #e6edf3) !important;
  font-size: 14px !important;
  box-shadow: none !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-search::placeholder {
  color: var(--axm-text-muted, #9aa5b4);
  opacity: 1;
  text-transform: capitalize;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-search:focus {
  border-color: #ea580c !important;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-categories {
  gap: 4px !important;
  padding: 0 !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-categories button.list-group-item {
  display: flex !important;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px !important;
  position: relative;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: var(--axm-text-muted, #9aa5b4) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-categories button.list-group-item:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--axm-text, #e6edf3) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-categories button.list-group-item.active {
  background: rgba(234, 88, 12, 0.08) !important;
  border-color: #ea580c !important;
  color: #fb923c !important;
  font-weight: 600 !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-categories button[data-atmo-cat="all"] {
  margin-top: 10px !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-categories button[data-atmo-cat="all"]::after {
  content: "";
  position: absolute;
  top: -7px;
  left: 4px;
  right: 4px;
  height: 1px;
  background: var(--axm-border, #2c3846);
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-list {
  gap: 4px !important;
  padding-right: 4px !important;
  scrollbar-width: thin;
  scrollbar-color: var(--axm-border-strong, #3a4757) transparent;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-row {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 12px !important;
  gap: 12px !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: transparent !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-row:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: transparent !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-row.is-active {
  background: rgba(234, 88, 12, 0.08) !important;
  border-color: #ea580c !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-row-icon {
  flex: 0 0 30px !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  background: #252f3b !important;
  color: var(--axm-text-muted, #9aa5b4) !important;
  font-size: 14px !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-row.is-active .axm-atmo-row-icon {
  background: rgba(234, 88, 12, 0.16) !important;
  color: #fb923c !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-row-name {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--axm-text, #e6edf3);
  text-transform: capitalize;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-row.is-active .axm-atmo-row-name {
  font-weight: 600 !important;
}
@media (min-width: 1200px) {
  :is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-sidebar-preview {
    background: var(--axm-modal-bg, #1a222c) !important;
    border: 1px solid var(--axm-border, #2c3846) !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal button#atmo-apply-btn.axm-atmo-apply-btn {
  background: rgba(234, 88, 12, 0.08) !important;
  background-color: rgba(234, 88, 12, 0.08) !important;
  background-image: none !important;
  border: 1px solid #ea580c !important;
  border-radius: 10px !important;
  color: #fb923c !important;
  min-height: 44px;
  padding: 0 24px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal button#atmo-apply-btn.axm-atmo-apply-btn i {
  color: #fb923c !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal button#atmo-apply-btn.axm-atmo-apply-btn:hover:not(:disabled),
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal button#atmo-apply-btn.axm-atmo-apply-btn:focus-visible:not(:disabled) {
  background: rgba(234, 88, 12, 0.16) !important;
  background-color: rgba(234, 88, 12, 0.16) !important;
  border-color: #ea580c !important;
  color: #fb923c !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal button#atmo-apply-btn.axm-atmo-apply-btn:disabled {
  background: transparent !important;
  background-color: transparent !important;
  border-color: var(--axm-border-strong, #3a4757) !important;
  color: var(--axm-text-muted, #9aa5b4) !important;
  opacity: 0.5;
  cursor: not-allowed;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-categories button:focus-visible,
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-row:focus-visible,
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-modal-header .btn-close:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
  box-shadow: none;
}
@media (prefers-reduced-motion: no-preference) {
  :is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-categories button.list-group-item.active,
  :is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal .axm-atmo-row.is-active {
    animation: axm-atmo-pulse 2.6s ease-in-out infinite;
  }
  :is(html[data-bs-theme="dark"], html[data-theme="dark"]) #atmosphereModal button#atmo-apply-btn.axm-atmo-apply-btn:not(:disabled) {
    animation: axm-atmo-glow 2.4s ease-in-out infinite;
  }
}

/* 6. Light theme (same design, light palette) */
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-modal-content {
  background: var(--axm-modal-bg, #ffffff) !important;
  border: 1px solid var(--axm-border, #dfe3e8) !important;
  box-shadow: 0 30px 80px rgba(17, 24, 39, 0.35) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-modal-header {
  background: transparent !important;
  border-bottom: 1px solid var(--axm-border, #dfe3e8) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-modal-header .modal-title {
  color: var(--axm-text, #1f2937) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-modal-footer {
  background: transparent !important;
  border-top: 1px solid var(--axm-border, #dfe3e8) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-sidebar-col {
  border-right: 1px solid var(--axm-border, #dfe3e8) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-search {
  height: 40px;
  background: transparent !important;
  border: 1px solid var(--axm-border, #dfe3e8) !important;
  border-radius: 8px !important;
  color: var(--axm-text, #1f2937) !important;
  font-size: 14px !important;
  box-shadow: none !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-search::placeholder {
  color: var(--axm-text-muted, #6b7280);
  opacity: 1;
  text-transform: capitalize;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-search:focus {
  border-color: #ea580c !important;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-categories {
  gap: 4px !important;
  padding: 0 !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-categories button.list-group-item {
  display: flex !important;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px !important;
  position: relative;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: var(--axm-text-muted, #6b7280) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-categories button.list-group-item:hover {
  background: rgba(17, 24, 39, 0.04) !important;
  color: var(--axm-text, #1f2937) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-categories button.list-group-item.active {
  background: rgba(234, 88, 12, 0.08) !important;
  border-color: #ea580c !important;
  color: #c2410c !important;
  font-weight: 600 !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-categories button[data-atmo-cat="all"] {
  margin-top: 10px !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-categories button[data-atmo-cat="all"]::after {
  content: "";
  position: absolute;
  top: -7px;
  left: 4px;
  right: 4px;
  height: 1px;
  background: var(--axm-border, #dfe3e8);
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-list {
  gap: 4px !important;
  padding-right: 4px !important;
  scrollbar-width: thin;
  scrollbar-color: var(--axm-border-strong, #cbd2da) transparent;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-row {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0 12px !important;
  gap: 12px !important;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  background: transparent !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-row:hover {
  background: rgba(17, 24, 39, 0.04) !important;
  border-color: transparent !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-row.is-active {
  background: rgba(234, 88, 12, 0.08) !important;
  border-color: #ea580c !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-row-icon {
  flex: 0 0 30px !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  background: #eef0f3 !important;
  color: var(--axm-text-muted, #6b7280) !important;
  font-size: 14px !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-row.is-active .axm-atmo-row-icon {
  background: rgba(234, 88, 12, 0.16) !important;
  color: #c2410c !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-row-name {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--axm-text, #1f2937);
  text-transform: capitalize;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-row.is-active .axm-atmo-row-name {
  font-weight: 600 !important;
}
@media (min-width: 1200px) {
  html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-sidebar-preview {
    background: var(--axm-modal-bg, #ffffff) !important;
    border: 1px solid var(--axm-border, #dfe3e8) !important;
    box-shadow: 0 30px 80px rgba(17, 24, 39, 0.35);
}
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal button#atmo-apply-btn.axm-atmo-apply-btn {
  background: rgba(234, 88, 12, 0.08) !important;
  background-color: rgba(234, 88, 12, 0.08) !important;
  background-image: none !important;
  border: 1px solid #ea580c !important;
  border-radius: 10px !important;
  color: #c2410c !important;
  min-height: 44px;
  padding: 0 24px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal button#atmo-apply-btn.axm-atmo-apply-btn i {
  color: #c2410c !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal button#atmo-apply-btn.axm-atmo-apply-btn:hover:not(:disabled),
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal button#atmo-apply-btn.axm-atmo-apply-btn:focus-visible:not(:disabled) {
  background: rgba(234, 88, 12, 0.16) !important;
  background-color: rgba(234, 88, 12, 0.16) !important;
  border-color: #ea580c !important;
  color: #c2410c !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal button#atmo-apply-btn.axm-atmo-apply-btn:disabled {
  background: transparent !important;
  background-color: transparent !important;
  border-color: var(--axm-border-strong, #cbd2da) !important;
  color: var(--axm-text-muted, #6b7280) !important;
  opacity: 0.5;
  cursor: not-allowed;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-categories button:focus-visible,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-row:focus-visible,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-modal-header .btn-close:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
  box-shadow: none;
}
@media (prefers-reduced-motion: no-preference) {
  html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-categories button.list-group-item.active,
  html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal .axm-atmo-row.is-active {
    animation: axm-atmo-pulse 2.6s ease-in-out infinite;
  }
  html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #atmosphereModal button#atmo-apply-btn.axm-atmo-apply-btn:not(:disabled) {
    animation: axm-atmo-glow 2.4s ease-in-out infinite;
  }
}

/* 7. Visual Effects panel controls: orange instead of blue (dark theme) */
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #effectsControlsContainer #btn-select-atmosphere-sidebar {
  --bs-btn-focus-shadow-rgb: 234, 88, 12;
  background: transparent !important;
  border: 1px solid #ea580c !important;
  color: #fb923c !important;
  box-shadow: none !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #effectsControlsContainer #btn-select-atmosphere-sidebar:hover,
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #effectsControlsContainer #btn-select-atmosphere-sidebar:focus-visible {
  background: rgba(234, 88, 12, 0.12) !important;
  border-color: #ea580c !important;
  color: #fb923c !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #effectsControlsContainer .fx-depth-stack .effects-depth-btn.active {
  background: rgba(234, 88, 12, 0.12) !important;
  border-color: #ea580c !important;
  color: #fb923c !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #effectsControlsContainer .fx-depth-stack .effects-depth-btn:hover {
  border-color: #ea580c !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #effectsControlsContainer button.fx-gear[aria-expanded="true"] {
  background: rgba(234, 88, 12, 0.12) !important;
  border-color: #ea580c !important;
  color: #fb923c !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #effectsControlsContainer button.fx-gear:hover,
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #effectsControlsContainer button.fx-gear:focus-visible {
  border-color: #ea580c !important;
  color: #fb923c !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #effectsControlsContainer #btn-select-atmosphere-sidebar:focus-visible,
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #effectsControlsContainer .fx-depth-stack .effects-depth-btn:focus-visible,
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #effectsControlsContainer button.fx-gear:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #effectsControlsContainer .form-select:focus,
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #effectsControlsContainer .form-control:focus {
  border-color: #ea580c !important;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #effectsControlsContainer input[type="range"].form-range::-webkit-slider-thumb {
  background: #ea580c !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #effectsControlsContainer input[type="range"].form-range::-moz-range-thumb {
  background: #ea580c !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #effectsControlsContainer input[type="range"].form-range:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.25) !important;
}
@media (prefers-reduced-motion: no-preference) {
  :is(html[data-bs-theme="dark"], html[data-theme="dark"]) #effectsControlsContainer .fx-depth-stack .effects-depth-btn.active,
  :is(html[data-bs-theme="dark"], html[data-theme="dark"]) #effectsControlsContainer button.fx-gear[aria-expanded="true"] {
    animation: axm-atmo-pulse 2.6s ease-in-out infinite;
  }
  :is(html[data-bs-theme="dark"], html[data-theme="dark"]) #effectsControlsContainer #btn-select-atmosphere-sidebar:hover {
    animation: axm-atmo-pulse 1.4s ease-out infinite;
  }
}

/* 8. Visual Effects panel controls (light theme) */
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #effectsControlsContainer #btn-select-atmosphere-sidebar {
  --bs-btn-focus-shadow-rgb: 234, 88, 12;
  background: transparent !important;
  border: 1px solid #ea580c !important;
  color: #c2410c !important;
  box-shadow: none !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #effectsControlsContainer #btn-select-atmosphere-sidebar:hover,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #effectsControlsContainer #btn-select-atmosphere-sidebar:focus-visible {
  background: rgba(234, 88, 12, 0.12) !important;
  border-color: #ea580c !important;
  color: #c2410c !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #effectsControlsContainer .fx-depth-stack .effects-depth-btn.active {
  background: rgba(234, 88, 12, 0.12) !important;
  border-color: #ea580c !important;
  color: #c2410c !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #effectsControlsContainer .fx-depth-stack .effects-depth-btn:hover {
  border-color: #ea580c !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #effectsControlsContainer button.fx-gear[aria-expanded="true"] {
  background: rgba(234, 88, 12, 0.12) !important;
  border-color: #ea580c !important;
  color: #c2410c !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #effectsControlsContainer button.fx-gear:hover,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #effectsControlsContainer button.fx-gear:focus-visible {
  border-color: #ea580c !important;
  color: #c2410c !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #effectsControlsContainer #btn-select-atmosphere-sidebar:focus-visible,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #effectsControlsContainer .fx-depth-stack .effects-depth-btn:focus-visible,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #effectsControlsContainer button.fx-gear:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #effectsControlsContainer .form-select:focus,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #effectsControlsContainer .form-control:focus {
  border-color: #ea580c !important;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #effectsControlsContainer input[type="range"].form-range::-webkit-slider-thumb {
  background: #ea580c !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #effectsControlsContainer input[type="range"].form-range::-moz-range-thumb {
  background: #ea580c !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #effectsControlsContainer input[type="range"].form-range:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.25) !important;
}
@media (prefers-reduced-motion: no-preference) {
  html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #effectsControlsContainer .fx-depth-stack .effects-depth-btn.active,
  html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #effectsControlsContainer button.fx-gear[aria-expanded="true"] {
    animation: axm-atmo-pulse 2.6s ease-in-out infinite;
  }
  html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #effectsControlsContainer #btn-select-atmosphere-sidebar:hover {
    animation: axm-atmo-pulse 1.4s ease-out infinite;
  }
}

/* 9. Choose A Video Format popup: size and layout (both themes) */
#socialVideoModal .modal-dialog {
  max-width: min(800px, calc(100vw - 32px)) !important;
}
#socialVideoModal .modal-dialog-scrollable {
  height: auto !important;
}
#socialVideoModal .modal-dialog-scrollable .modal-content {
  max-height: min(640px, calc(100vh - 3.5rem)) !important;
  border-radius: 16px !important;
}
#socialVideoModal .modal-header {
  min-height: 60px;
  padding: 0 12px 0 24px !important;
  align-items: center !important;
}
#socialVideoModal .modal-header .modal-title {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
}
#socialVideoModal .modal-header .modal-title i {
  font-size: 18px;
  margin-right: 12px !important;
}
#socialVideoModal .modal-body {
  padding: 20px 24px 24px !important;
}
#socialVideoModal.axm-vf-compact .modal-body > .row {
  --bs-gutter-x: 0;
}
#socialVideoModal.axm-vf-compact .col-md-3 {
  display: none !important;
}
#socialVideoModal.axm-vf-compact .col-md-9 {
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
}

/* 9a. Toolbar (built by video-explorer.js): Most Popular, platform, orientation icons, search */
#socialVideoModal .axm-vf-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
#socialVideoModal .axm-vf-chip {
  flex: none;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
#socialVideoModal .axm-vf-select {
  flex: none;
  width: 184px;
  height: 40px;
  padding: 0 38px 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
}
#socialVideoModal .axm-vf-ori {
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 40px;
  box-sizing: border-box;
  padding: 3px;
  border-radius: 999px;
}
#socialVideoModal .axm-vf-ori-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#socialVideoModal .axm-vf-toolbar .input-group {
  flex: 1 1 200px;
  width: auto;
  min-width: 0;
  height: 40px;
  flex-wrap: nowrap;
  margin: 0 !important;
  border-radius: 999px;
  overflow: hidden;
}
#socialVideoModal .axm-vf-toolbar .input-group-text {
  height: 100%;
  padding: 0 0 0 16px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
#socialVideoModal .axm-vf-toolbar .form-control {
  height: 100% !important;
  padding: 0 16px 0 10px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 14px !important;
}

/* 9b. Format cards: compact, icon tile on the left */
#socialVideoModal #format-library-grid {
  --bs-gutter-x: 0.75rem;
  --bs-gutter-y: 0.75rem;
}
@media (min-width: 768px) {
  #socialVideoModal #format-library-grid > .col {
    flex: 0 0 auto;
    width: 33.33333% !important;
  }
}
#socialVideoModal .format-card {
  height: 68px !important;
  border-radius: 12px !important;
  box-shadow: none;
  transform: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
#socialVideoModal .format-card .card-body {
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center !important;
  align-content: center;
  justify-items: start;
  height: 100%;
  padding: 0 14px !important;
}
#socialVideoModal .format-card .format-icon-wrapper {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 40px;
  height: 40px;
  margin: 0 !important;
  border-radius: 10px;
}
#socialVideoModal .format-card .format-icon-wrapper i {
  font-size: 18px !important;
}
#socialVideoModal .format-card .card-title {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  display: block;
  min-height: 0 !important;
  max-width: 100%;
  margin: 0 !important;
  overflow: hidden;
  text-align: left !important;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px !important;
  font-weight: 600 !important;
}
#socialVideoModal .format-card .card-text {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  margin: 0 !important;
  font-size: 12px !important;
}

/* 9c. If the toolbar script did not run, the old sidebar stays: compact rows, orange selection */
#socialVideoModal #format-category-sidebar .list-group-item {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  font-size: 14px;
}
@media (max-width: 767.98px) {
  #socialVideoModal .axm-vf-select {
    flex: 1 1 140px;
    width: auto;
  }
}

/* 10. Choose A Video Format popup: dark theme */
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .modal-content {
  background: var(--axm-modal-bg, #1a222c) !important;
  border: 1px solid var(--axm-border, #2c3846) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55) !important;
  color: var(--axm-text, #e6edf3) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .modal-header {
  background: transparent !important;
  border-bottom: 1px solid var(--axm-border, #2c3846) !important;
  color: var(--axm-text, #e6edf3) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .modal-header .modal-title {
  color: var(--axm-text, #e6edf3) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .modal-header .modal-title i {
  color: var(--axm-text-muted, #9aa5b4);
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .modal-header .btn-close:focus {
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.25);
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-chip {
  border: 1px solid var(--axm-border, #2c3846);
  background: transparent;
  color: var(--axm-text-muted, #9aa5b4);
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-chip:hover {
  border-color: var(--axm-border-strong, #3a4757);
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-chip.is-on {
  border-color: #ea580c;
  background: rgba(234, 88, 12, 0.08);
  color: #fb923c;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-select {
  border: 1px solid var(--axm-border, #2c3846);
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa5b4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  color: var(--axm-text, #e6edf3);
  color-scheme: dark;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-select:hover {
  border-color: var(--axm-border-strong, #3a4757);
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-select.is-set {
  border-color: #ea580c;
  color: #fb923c;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-select:focus {
  outline: none;
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18);
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-ori {
  border: 1px solid var(--axm-border, #2c3846);
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-ori-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--axm-text, #e6edf3);
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-ori-btn:hover {
  background: rgba(255, 255, 255, 0.04);
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-ori-btn.is-on {
  border-color: #ea580c;
  background: rgba(234, 88, 12, 0.08);
  color: #fb923c;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-ori-btn.is-off {
  color: var(--axm-text-muted, #9aa5b4);
  opacity: 0.55;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-toolbar .input-group {
  border: 1px solid var(--axm-border, #2c3846);
  background: transparent;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-toolbar .input-group:focus-within {
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18);
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-toolbar .input-group-text {
  color: var(--axm-text-muted, #9aa5b4) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-toolbar .form-control {
  color: var(--axm-text, #e6edf3) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-toolbar .form-control::placeholder {
  color: var(--axm-text-muted, #9aa5b4);
  opacity: 1;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .format-card {
  border: 1px solid var(--axm-border, #2c3846) !important;
  color: var(--axm-text, #e6edf3) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .format-card .format-icon-wrapper {
  background: #252f3b;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .format-card .format-icon-wrapper i {
  color: var(--axm-text-muted, #9aa5b4) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .format-card .card-title {
  color: var(--axm-text, #e6edf3) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .format-card .card-text {
  color: var(--axm-text-muted, #9aa5b4) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .format-card:hover {
  border-color: #ea580c !important;
  background: rgba(234, 88, 12, 0.08) !important;
  box-shadow: none !important;
  transform: none !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .format-card:hover .format-icon-wrapper {
  background: rgba(234, 88, 12, 0.16);
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .format-card:hover .format-icon-wrapper i {
  color: #fb923c !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal #format-category-sidebar .list-group-item.active {
  background: rgba(234, 88, 12, 0.08) !important;
  border-color: #ea580c !important;
  color: #fb923c !important;
  font-weight: 600;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-chip:focus-visible,
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-ori-btn:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  :is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-chip.is-on,
  :is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .axm-vf-ori-btn.is-on,
  :is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal #format-category-sidebar .list-group-item.active {
    animation: axm-atmo-pulse 2.6s ease-in-out infinite;
  }
  :is(html[data-bs-theme="dark"], html[data-theme="dark"]) #socialVideoModal .format-card:hover {
    animation: axm-atmo-pulse 1.6s ease-out infinite;
  }
}

/* 11. Choose A Video Format popup: light theme */
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .modal-content {
  background: var(--axm-modal-bg, #ffffff) !important;
  border: 1px solid var(--axm-border, #dfe3e8) !important;
  box-shadow: 0 30px 80px rgba(17, 24, 39, 0.35) !important;
  color: var(--axm-text, #1f2937) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .modal-header {
  background: transparent !important;
  border-bottom: 1px solid var(--axm-border, #dfe3e8) !important;
  color: var(--axm-text, #1f2937) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .modal-header .modal-title {
  color: var(--axm-text, #1f2937) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .modal-header .modal-title i {
  color: var(--axm-text-muted, #6b7280);
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .modal-header .btn-close:focus {
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.25);
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-chip {
  border: 1px solid var(--axm-border, #dfe3e8);
  background: transparent;
  color: var(--axm-text-muted, #6b7280);
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-chip:hover {
  border-color: var(--axm-border-strong, #cbd2da);
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-chip.is-on {
  border-color: #ea580c;
  background: rgba(234, 88, 12, 0.08);
  color: #c2410c;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-select {
  border: 1px solid var(--axm-border, #dfe3e8);
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  color: var(--axm-text, #1f2937);
  color-scheme: light;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-select:hover {
  border-color: var(--axm-border-strong, #cbd2da);
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-select.is-set {
  border-color: #ea580c;
  color: #c2410c;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-select:focus {
  outline: none;
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18);
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-ori {
  border: 1px solid var(--axm-border, #dfe3e8);
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-ori-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--axm-text, #1f2937);
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-ori-btn:hover {
  background: rgba(17, 24, 39, 0.04);
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-ori-btn.is-on {
  border-color: #ea580c;
  background: rgba(234, 88, 12, 0.08);
  color: #c2410c;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-ori-btn.is-off {
  color: var(--axm-text-muted, #6b7280);
  opacity: 0.55;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-toolbar .input-group {
  border: 1px solid var(--axm-border, #dfe3e8);
  background: transparent;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-toolbar .input-group:focus-within {
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18);
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-toolbar .input-group-text {
  color: var(--axm-text-muted, #6b7280) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-toolbar .form-control {
  color: var(--axm-text, #1f2937) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-toolbar .form-control::placeholder {
  color: var(--axm-text-muted, #6b7280);
  opacity: 1;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .format-card {
  border: 1px solid var(--axm-border, #dfe3e8) !important;
  color: var(--axm-text, #1f2937) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .format-card .format-icon-wrapper {
  background: #eef0f3;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .format-card .format-icon-wrapper i {
  color: var(--axm-text-muted, #6b7280) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .format-card .card-title {
  color: var(--axm-text, #1f2937) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .format-card .card-text {
  color: var(--axm-text-muted, #6b7280) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .format-card:hover {
  border-color: #ea580c !important;
  background: rgba(234, 88, 12, 0.08) !important;
  box-shadow: none !important;
  transform: none !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .format-card:hover .format-icon-wrapper {
  background: rgba(234, 88, 12, 0.16);
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .format-card:hover .format-icon-wrapper i {
  color: #c2410c !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal #format-category-sidebar .list-group-item.active {
  background: rgba(234, 88, 12, 0.08) !important;
  border-color: #ea580c !important;
  color: #c2410c !important;
  font-weight: 600;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-chip:focus-visible,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-ori-btn:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-chip.is-on,
  html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .axm-vf-ori-btn.is-on,
  html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal #format-category-sidebar .list-group-item.active {
    animation: axm-atmo-pulse 2.6s ease-in-out infinite;
  }
  html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #socialVideoModal .format-card:hover {
    animation: axm-atmo-pulse 1.6s ease-out infinite;
  }
}

/* 12. Create Branding Guide popup: size, spacing and shapes (both themes) */
html #brandProfilePopup .modal-content {
  border-radius: 16px !important;
  overflow: hidden;
}
html #brandProfilePopup .modal-header {
  min-height: 60px;
  padding: 0 12px 0 24px !important;
  align-items: center !important;
}
html #brandProfilePopup .modal-header .modal-title {
  font-size: 18px !important;
  font-weight: 600 !important;
  gap: 12px !important;
}
html #brandProfilePopup .modal-header .modal-title i {
  font-size: 20px !important;
  color: #ea580c !important;
}
html #brandProfilePopup .modal-body {
  padding: 24px 24px 26px !important;
}
html #brandProfilePopup .bp-mode-toggle {
  display: inline-flex !important;
  width: auto !important;
  gap: 2px !important;
  padding: 3px !important;
  margin-bottom: 20px !important;
  border-radius: 999px !important;
}
html #brandProfilePopup .bp-toggle-btn {
  flex: 0 0 auto !important;
  height: 34px;
  padding: 0 16px !important;
  gap: 8px !important;
  border-radius: 999px !important;
  border: 1px solid transparent !important;
  font-size: 14px !important;
  box-shadow: none !important;
}
html #brandProfilePopup .bp-input-row {
  gap: 10px !important;
  margin-bottom: 0 !important;
}
html #brandProfilePopup #bpPopupUrl,
html #brandProfilePopup #bpPopupFile {
  height: 44px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  box-shadow: none !important;
}
html #brandProfilePopup #bpPopupFile {
  padding: 6px 7px !important;
  align-items: center;
}
html #brandProfilePopup #bpPopupFile::file-selector-button {
  height: 30px;
  margin-right: 12px;
  padding: 0 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
html #brandProfilePopup #bpActionBtn {
  height: 44px !important;
  width: auto !important;
  min-width: 110px;
  padding: 0 24px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  white-space: nowrap;
}
html #brandProfilePopup button[title="Download blank template"] {
  width: 44px !important;
  height: 44px !important;
  border-radius: 10px !important;
}
html #brandProfilePopup #bpPhaseInputStatus {
  margin-top: 12px;
  font-size: 12px !important;
  min-height: 16px;
}
html #brandProfilePopup #bpPhaseLoading,
html #brandProfilePopup #bpPhaseSuccess,
html #brandProfilePopup #bpPhaseError {
  padding: 8px 0 0 !important;
}
html #brandProfilePopup #bpPhaseLoading .spinner-border {
  width: 40px !important;
  height: 40px !important;
  border-width: 2px !important;
  color: #ea580c !important;
}
html #brandProfilePopup #bpPhaseLoading > div:nth-child(2) {
  font-size: 15px !important;
  font-weight: 500 !important;
}
html #brandProfilePopup #bpCancelBtn {
  height: 40px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}
html #brandProfilePopup #bpPhaseSuccess > div:nth-child(1) {
  color: #ea580c !important;
}
html #brandProfilePopup #bpPhaseSuccess > div:nth-child(2),
html #brandProfilePopup #bpPhaseError > div:nth-child(2) {
  font-size: 16px !important;
  font-weight: 600 !important;
}
html #brandProfilePopup #bpPhaseSuccess button[onclick*="viewBrandGuidePreview"],
html #brandProfilePopup #bpDownloadBtn,
html #brandProfilePopup #bpRetryBtn {
  height: 44px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  box-shadow: none;
}
html #brandProfilePopup #bpPhaseSuccess button[data-bs-dismiss="modal"],
html #brandProfilePopup #bpPhaseError button[data-bs-dismiss="modal"] {
  height: 40px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
}
html #brandProfilePopup .axm-bg-popup-apply {
  margin-top: 16px !important;
  padding-top: 16px !important;
}
html #brandProfilePopup .axm-bg-remove-link {
  font-size: 12px !important;
}

/* 13. Generate Script form: Details tabs, Upload tab and the guide controls (both themes) */
html #aiScriptGeneratorModal .axm-ctx-tab-row {
  display: flex !important;
  gap: 22px !important;
  padding: 0 !important;
  margin-bottom: 14px !important;
  background: transparent !important;
}
html #aiScriptGeneratorModal .axm-ctx-tab {
  display: inline-flex !important;
  align-items: center;
  height: 38px;
  margin: 0 !important;
  padding: 0 2px !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  cursor: pointer;
}
html #aiScriptGeneratorModal .axm-ctx-tab--active {
  font-weight: 600 !important;
  border-bottom-color: #ea580c !important;
}
html #aiScriptGeneratorModal .axm-bg-drop {
  border-radius: 10px !important;
  opacity: 1 !important;
}
html #aiScriptGeneratorModal .axm-bg-attached {
  border-radius: 10px !important;
}
html #aiScriptGeneratorModal .axm-bg-dot {
  background: #ea580c !important;
}

/* 14. Create Branding Guide popup: dark (its own data-theme attribute) */
html #brandProfilePopup[data-theme="dark"] .modal-content {
  background: var(--axm-modal-bg, #1a222c) !important;
  border: 1px solid var(--axm-border, #2c3846) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55) !important;
  color: var(--axm-text, #e6edf3) !important;
}
html #brandProfilePopup[data-theme="dark"] .modal-header,
html #brandProfilePopup[data-theme="dark"] .modal-body {
  background: transparent !important;
}
html #brandProfilePopup[data-theme="dark"] .modal-header {
  border-bottom: 1px solid var(--axm-border, #2c3846) !important;
}
html #brandProfilePopup[data-theme="dark"] .modal-title {
  color: var(--axm-text, #e6edf3) !important;
}
html #brandProfilePopup[data-theme="dark"] .bp-mode-toggle {
  background: transparent !important;
  border: 1px solid var(--axm-border, #2c3846) !important;
}
html #brandProfilePopup[data-theme="dark"] .bp-toggle-btn {
  background: transparent !important;
  color: var(--axm-text-muted, #9aa5b4) !important;
  font-weight: 500 !important;
}
html #brandProfilePopup[data-theme="dark"] .bp-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--axm-text, #e6edf3) !important;
}
html #brandProfilePopup[data-theme="dark"] .bp-toggle-btn.bp-toggle-active {
  background: rgba(234, 88, 12, 0.08) !important;
  border-color: #ea580c !important;
  color: #fb923c !important;
  font-weight: 600 !important;
}
html #brandProfilePopup[data-theme="dark"] #bpPopupUrl,
html #brandProfilePopup[data-theme="dark"] #bpPopupFile {
  background: transparent !important;
  border: 1px solid var(--axm-border, #2c3846) !important;
  color: var(--axm-text, #e6edf3) !important;
}
html #brandProfilePopup[data-theme="dark"] #bpPopupUrl::placeholder {
  color: var(--axm-text-muted, #9aa5b4) !important;
  opacity: 1;
}
html #brandProfilePopup[data-theme="dark"] #bpPopupUrl:focus,
html #brandProfilePopup[data-theme="dark"] #bpPopupFile:focus-within {
  border-color: #ea580c !important;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18) !important;
  outline: none !important;
}
html #brandProfilePopup[data-theme="dark"] #bpPopupFile::file-selector-button {
  border: 1px solid var(--axm-border-strong, #3a4757);
  background: #252f3b;
  color: var(--axm-text, #e6edf3);
}
html #brandProfilePopup[data-theme="dark"] #bpPopupFile::file-selector-button:hover {
  border-color: #ea580c;
}
html #brandProfilePopup[data-theme="dark"] #bpActionBtn,
html #brandProfilePopup[data-theme="dark"] #bpPhaseSuccess button[onclick*="viewBrandGuidePreview"],
html #brandProfilePopup[data-theme="dark"] #bpRetryBtn {
  background: rgba(234, 88, 12, 0.08) !important;
  border: 1px solid #ea580c !important;
  color: #fb923c !important;
}
html #brandProfilePopup[data-theme="dark"] #bpActionBtn:hover,
html #brandProfilePopup[data-theme="dark"] #bpPhaseSuccess button[onclick*="viewBrandGuidePreview"]:hover,
html #brandProfilePopup[data-theme="dark"] #bpRetryBtn:hover {
  background: rgba(234, 88, 12, 0.16) !important;
}
html #brandProfilePopup[data-theme="dark"] button[title="Download blank template"],
html #brandProfilePopup[data-theme="dark"] #bpDownloadBtn,
html #brandProfilePopup[data-theme="dark"] #bpCancelBtn,
html #brandProfilePopup[data-theme="dark"] #bpPhaseSuccess button[data-bs-dismiss="modal"],
html #brandProfilePopup[data-theme="dark"] #bpPhaseError button[data-bs-dismiss="modal"] {
  background: transparent !important;
  border: 1px solid var(--axm-border-strong, #3a4757) !important;
  color: var(--axm-text, #e6edf3) !important;
}
html #brandProfilePopup[data-theme="dark"] button[title="Download blank template"] {
  color: var(--axm-text-muted, #9aa5b4) !important;
}
html #brandProfilePopup[data-theme="dark"] button[title="Download blank template"]:hover,
html #brandProfilePopup[data-theme="dark"] #bpDownloadBtn:hover,
html #brandProfilePopup[data-theme="dark"] #bpCancelBtn:hover,
html #brandProfilePopup[data-theme="dark"] #bpPhaseSuccess button[data-bs-dismiss="modal"]:hover,
html #brandProfilePopup[data-theme="dark"] #bpPhaseError button[data-bs-dismiss="modal"]:hover {
  border-color: #ea580c !important;
  background: rgba(255, 255, 255, 0.04) !important;
}
html #brandProfilePopup[data-theme="dark"] #bpPhaseInputStatus,
html #brandProfilePopup[data-theme="dark"] #bpLoadingStatus,
html #brandProfilePopup[data-theme="dark"] #bpErrorMessage,
html #brandProfilePopup[data-theme="dark"] #bpPhaseSuccess > div:nth-child(3),
html #brandProfilePopup[data-theme="dark"] #bpPhaseError > div:nth-child(3),
html #brandProfilePopup[data-theme="dark"] .axm-bg-help,
html #brandProfilePopup[data-theme="dark"] .axm-bg-info,
html #brandProfilePopup[data-theme="dark"] #bpGeneratedNote {
  color: var(--axm-text-muted, #9aa5b4) !important;
  opacity: 1 !important;
}
html #brandProfilePopup[data-theme="dark"] #bpPhaseLoading > div:nth-child(2),
html #brandProfilePopup[data-theme="dark"] #bpPhaseSuccess > div:nth-child(2),
html #brandProfilePopup[data-theme="dark"] #bpPhaseError > div:nth-child(2),
html #brandProfilePopup[data-theme="dark"] .axm-bg-apply-text {
  color: var(--axm-text, #e6edf3) !important;
}
html #brandProfilePopup[data-theme="dark"] .axm-bg-popup-apply {
  border-top: 1px solid var(--axm-border, #2c3846) !important;
}
html #brandProfilePopup[data-theme="dark"] .axm-bg-remove-link {
  color: #fb923c !important;
}
html #brandProfilePopup[data-theme="dark"] .btn-close:focus {
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.25) !important;
}
html #brandProfilePopup[data-theme="dark"] button:focus-visible,
html #brandProfilePopup[data-theme="dark"] input:focus-visible {
  outline: 2px solid #ea580c !important;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  html #brandProfilePopup[data-theme="dark"] .bp-toggle-btn.bp-toggle-active {
    animation: axm-atmo-pulse 2.6s ease-in-out infinite;
  }
  html #brandProfilePopup[data-theme="dark"] #bpActionBtn,
  html #brandProfilePopup[data-theme="dark"] #bpPhaseSuccess button[onclick*="viewBrandGuidePreview"],
  html #brandProfilePopup[data-theme="dark"] #bpRetryBtn {
    animation: axm-atmo-glow 2.4s ease-in-out infinite;
  }
}

/* 15. Create Branding Guide popup: light */
html #brandProfilePopup[data-theme="light"] .modal-content {
  background: var(--axm-modal-bg, #ffffff) !important;
  border: 1px solid var(--axm-border, #dfe3e8) !important;
  box-shadow: 0 30px 80px rgba(17, 24, 39, 0.35) !important;
  color: var(--axm-text, #1f2937) !important;
}
html #brandProfilePopup[data-theme="light"] .modal-header,
html #brandProfilePopup[data-theme="light"] .modal-body {
  background: transparent !important;
}
html #brandProfilePopup[data-theme="light"] .modal-header {
  border-bottom: 1px solid var(--axm-border, #dfe3e8) !important;
}
html #brandProfilePopup[data-theme="light"] .modal-title {
  color: var(--axm-text, #1f2937) !important;
}
html #brandProfilePopup[data-theme="light"] .bp-mode-toggle {
  background: transparent !important;
  border: 1px solid var(--axm-border, #dfe3e8) !important;
}
html #brandProfilePopup[data-theme="light"] .bp-toggle-btn {
  background: transparent !important;
  color: var(--axm-text-muted, #6b7280) !important;
  font-weight: 500 !important;
}
html #brandProfilePopup[data-theme="light"] .bp-toggle-btn:hover {
  background: rgba(17, 24, 39, 0.04) !important;
  color: var(--axm-text, #1f2937) !important;
}
html #brandProfilePopup[data-theme="light"] .bp-toggle-btn.bp-toggle-active {
  background: rgba(234, 88, 12, 0.08) !important;
  border-color: #ea580c !important;
  color: #c2410c !important;
  font-weight: 600 !important;
}
html #brandProfilePopup[data-theme="light"] #bpPopupUrl,
html #brandProfilePopup[data-theme="light"] #bpPopupFile {
  background: transparent !important;
  border: 1px solid var(--axm-border, #dfe3e8) !important;
  color: var(--axm-text, #1f2937) !important;
}
html #brandProfilePopup[data-theme="light"] #bpPopupUrl::placeholder {
  color: var(--axm-text-muted, #6b7280) !important;
  opacity: 1;
}
html #brandProfilePopup[data-theme="light"] #bpPopupUrl:focus,
html #brandProfilePopup[data-theme="light"] #bpPopupFile:focus-within {
  border-color: #ea580c !important;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18) !important;
  outline: none !important;
}
html #brandProfilePopup[data-theme="light"] #bpPopupFile::file-selector-button {
  border: 1px solid var(--axm-border-strong, #cbd2da);
  background: #eef0f3;
  color: var(--axm-text, #1f2937);
}
html #brandProfilePopup[data-theme="light"] #bpPopupFile::file-selector-button:hover {
  border-color: #ea580c;
}
html #brandProfilePopup[data-theme="light"] #bpActionBtn,
html #brandProfilePopup[data-theme="light"] #bpPhaseSuccess button[onclick*="viewBrandGuidePreview"],
html #brandProfilePopup[data-theme="light"] #bpRetryBtn {
  background: rgba(234, 88, 12, 0.08) !important;
  border: 1px solid #ea580c !important;
  color: #c2410c !important;
}
html #brandProfilePopup[data-theme="light"] #bpActionBtn:hover,
html #brandProfilePopup[data-theme="light"] #bpPhaseSuccess button[onclick*="viewBrandGuidePreview"]:hover,
html #brandProfilePopup[data-theme="light"] #bpRetryBtn:hover {
  background: rgba(234, 88, 12, 0.16) !important;
}
html #brandProfilePopup[data-theme="light"] button[title="Download blank template"],
html #brandProfilePopup[data-theme="light"] #bpDownloadBtn,
html #brandProfilePopup[data-theme="light"] #bpCancelBtn,
html #brandProfilePopup[data-theme="light"] #bpPhaseSuccess button[data-bs-dismiss="modal"],
html #brandProfilePopup[data-theme="light"] #bpPhaseError button[data-bs-dismiss="modal"] {
  background: transparent !important;
  border: 1px solid var(--axm-border-strong, #cbd2da) !important;
  color: var(--axm-text, #1f2937) !important;
}
html #brandProfilePopup[data-theme="light"] button[title="Download blank template"] {
  color: var(--axm-text-muted, #6b7280) !important;
}
html #brandProfilePopup[data-theme="light"] button[title="Download blank template"]:hover,
html #brandProfilePopup[data-theme="light"] #bpDownloadBtn:hover,
html #brandProfilePopup[data-theme="light"] #bpCancelBtn:hover,
html #brandProfilePopup[data-theme="light"] #bpPhaseSuccess button[data-bs-dismiss="modal"]:hover,
html #brandProfilePopup[data-theme="light"] #bpPhaseError button[data-bs-dismiss="modal"]:hover {
  border-color: #ea580c !important;
  background: rgba(17, 24, 39, 0.04) !important;
}
html #brandProfilePopup[data-theme="light"] #bpPhaseInputStatus,
html #brandProfilePopup[data-theme="light"] #bpLoadingStatus,
html #brandProfilePopup[data-theme="light"] #bpErrorMessage,
html #brandProfilePopup[data-theme="light"] #bpPhaseSuccess > div:nth-child(3),
html #brandProfilePopup[data-theme="light"] #bpPhaseError > div:nth-child(3),
html #brandProfilePopup[data-theme="light"] .axm-bg-help,
html #brandProfilePopup[data-theme="light"] .axm-bg-info,
html #brandProfilePopup[data-theme="light"] #bpGeneratedNote {
  color: var(--axm-text-muted, #6b7280) !important;
  opacity: 1 !important;
}
html #brandProfilePopup[data-theme="light"] #bpPhaseLoading > div:nth-child(2),
html #brandProfilePopup[data-theme="light"] #bpPhaseSuccess > div:nth-child(2),
html #brandProfilePopup[data-theme="light"] #bpPhaseError > div:nth-child(2),
html #brandProfilePopup[data-theme="light"] .axm-bg-apply-text {
  color: var(--axm-text, #1f2937) !important;
}
html #brandProfilePopup[data-theme="light"] .axm-bg-popup-apply {
  border-top: 1px solid var(--axm-border, #dfe3e8) !important;
}
html #brandProfilePopup[data-theme="light"] .axm-bg-remove-link {
  color: #c2410c !important;
}
html #brandProfilePopup[data-theme="light"] .btn-close:focus {
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.25) !important;
}
html #brandProfilePopup[data-theme="light"] button:focus-visible,
html #brandProfilePopup[data-theme="light"] input:focus-visible {
  outline: 2px solid #ea580c !important;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  html #brandProfilePopup[data-theme="light"] .bp-toggle-btn.bp-toggle-active {
    animation: axm-atmo-pulse 2.6s ease-in-out infinite;
  }
  html #brandProfilePopup[data-theme="light"] #bpActionBtn,
  html #brandProfilePopup[data-theme="light"] #bpPhaseSuccess button[onclick*="viewBrandGuidePreview"],
  html #brandProfilePopup[data-theme="light"] #bpRetryBtn {
    animation: axm-atmo-glow 2.4s ease-in-out infinite;
  }
}

/* 16. Generate Script form guide controls: dark */
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal .axm-ctx-tab-row {
  border-bottom: 1px solid var(--axm-border, #2c3846) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal .axm-ctx-tab {
  color: var(--axm-text-muted, #9aa5b4) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal .axm-ctx-tab:hover {
  color: var(--axm-text, #e6edf3) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal .axm-ctx-tab--active {
  color: var(--axm-text, #e6edf3) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal .axm-bg-drop {
  border: 1px dashed var(--axm-border-strong, #3a4757) !important;
  color: var(--axm-text, #e6edf3) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal .axm-bg-drop:hover {
  border-color: #ea580c !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal .axm-bg-drop-title {
  color: var(--axm-text, #e6edf3) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal .axm-bg-drop-note,
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal .axm-bg-help,
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal .axm-bg-replace-note,
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal .axm-bg-chars,
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal .axm-bg-status {
  color: var(--axm-text-muted, #9aa5b4) !important;
  opacity: 1 !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal .axm-bg-attached {
  border: 1px solid var(--axm-border, #2c3846) !important;
  color: var(--axm-text, #e6edf3) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal .axm-bg-file {
  color: var(--axm-text, #e6edf3) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal .axm-bg-remove {
  color: #fb923c !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal .axm-bg-apply-text {
  color: var(--axm-text, #e6edf3) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal a[onclick*="openBrandProfilePopup"] {
  color: #fb923c !important;
  text-underline-offset: 3px;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal .axm-ctx-tab:focus-visible,
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal .axm-bg-drop:focus-visible,
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #aiScriptGeneratorModal #axmBgApplyForm:focus-visible {
  outline: 2px solid #ea580c !important;
  outline-offset: 2px;
}

/* 17. Generate Script form guide controls: light */
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal .axm-ctx-tab-row {
  border-bottom: 1px solid var(--axm-border, #dfe3e8) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal .axm-ctx-tab {
  color: var(--axm-text-muted, #6b7280) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal .axm-ctx-tab:hover {
  color: var(--axm-text, #1f2937) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal .axm-ctx-tab--active {
  color: var(--axm-text, #1f2937) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal .axm-bg-drop {
  border: 1px dashed var(--axm-border-strong, #cbd2da) !important;
  color: var(--axm-text, #1f2937) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal .axm-bg-drop:hover {
  border-color: #ea580c !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal .axm-bg-drop-title {
  color: var(--axm-text, #1f2937) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal .axm-bg-drop-note,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal .axm-bg-help,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal .axm-bg-replace-note,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal .axm-bg-chars,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal .axm-bg-status {
  color: var(--axm-text-muted, #6b7280) !important;
  opacity: 1 !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal .axm-bg-attached {
  border: 1px solid var(--axm-border, #dfe3e8) !important;
  color: var(--axm-text, #1f2937) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal .axm-bg-file {
  color: var(--axm-text, #1f2937) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal .axm-bg-remove {
  color: #c2410c !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal .axm-bg-apply-text {
  color: var(--axm-text, #1f2937) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal a[onclick*="openBrandProfilePopup"] {
  color: #c2410c !important;
  text-underline-offset: 3px;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal .axm-ctx-tab:focus-visible,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal .axm-bg-drop:focus-visible,
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #aiScriptGeneratorModal #axmBgApplyForm:focus-visible {
  outline: 2px solid #ea580c !important;
  outline-offset: 2px;
}

/* 18. Advanced Ad Creator popup: header and frame (both themes) */
html #customImageModal .modal-content {
  border-radius: 16px !important;
  overflow: hidden !important;
}
html #customImageModal .modal-header {
  min-height: 52px;
  padding: 0 12px 0 20px !important;
  align-items: center !important;
}
html #customImageModal .modal-title {
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}
html #customImageModal .modal-header i,
html #customImageModal .modal-header svg,
html #customImageModal .modal-header .bi,
html #customImageModal .modal-header .fas,
html #customImageModal .modal-header .fa {
  color: #ea580c !important;
  fill: #ea580c;
}
html #customImageModal .modal-header .btn-close:focus {
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.25) !important;
}

/* 19. Advanced Ad Creator popup header: dark */
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #customImageModal .modal-content {
  background: var(--axm-modal-bg, #1a222c) !important;
  border: 1px solid var(--axm-border, #2c3846) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #customImageModal .modal-header {
  background: transparent !important;
  border-bottom: 1px solid var(--axm-border, #2c3846) !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) #customImageModal .modal-title {
  color: var(--axm-text, #e6edf3) !important;
}

/* 20. Advanced Ad Creator popup header: light */
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #customImageModal .modal-content {
  background: var(--axm-modal-bg, #ffffff) !important;
  border: 1px solid var(--axm-border, #dfe3e8) !important;
  box-shadow: 0 30px 80px rgba(17, 24, 39, 0.35) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #customImageModal .modal-header {
  background: transparent !important;
  border-bottom: 1px solid var(--axm-border, #dfe3e8) !important;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) #customImageModal .modal-title {
  color: var(--axm-text, #1f2937) !important;
}

/* 21. Select Voices / Audio Results panel: orange, no blue, no green, theme-colored player */
html {
  --axm-orange: #ea580c;
  --axm-orange-text: #c2410c;
  --axm-orange-tint: rgba(234, 88, 12, 0.08);
  --axm-orange-tint2: rgba(234, 88, 12, 0.16);
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) {
  --axm-orange-text: #fb923c;
}
html .axm-voice-panel #generateAudioBtn {
  display: inline-flex;
  align-items: center;
  background: var(--axm-orange-tint) !important;
  border: 1px solid var(--axm-orange) !important;
  color: var(--axm-orange-text) !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  box-shadow: none;
}
html .axm-voice-panel #generateAudioBtn:hover:not(:disabled) {
  background: var(--axm-orange-tint2) !important;
  border-color: var(--axm-orange) !important;
  color: var(--axm-orange-text) !important;
}
html .axm-voice-panel #generateAudioBtn:disabled {
  background: transparent !important;
  border-color: var(--axm-border-strong, #cbd2da) !important;
  color: var(--axm-text-muted, #6b7280) !important;
  opacity: 0.55;
}
html .axm-voice-panel #addSpeakerBtn,
html .axm-voice-panel #axmHistoryToggle {
  color: var(--axm-orange-text) !important;
  text-underline-offset: 3px;
}
html .axm-voice-panel #addSpeakerBtn:hover,
html .axm-voice-panel #axmHistoryToggle:hover {
  color: var(--axm-orange-text) !important;
  text-decoration: underline;
}
html .axm-voice-panel #axmMoreOptionsToggle {
  color: var(--axm-text-muted, #6b7280) !important;
}
html .axm-voice-panel #axmMoreOptionsToggle:hover {
  color: var(--axm-text, #1f2937) !important;
}
html .axm-voice-panel #addMusicBtn {
  background: transparent !important;
  border: 1px solid var(--axm-border-strong, #cbd2da) !important;
  color: var(--axm-text, #1f2937) !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  box-shadow: none;
}
html .axm-voice-panel #addMusicBtn:hover {
  background: var(--axm-orange-tint) !important;
  border-color: var(--axm-orange) !important;
  color: var(--axm-text, #1f2937) !important;
}
html .axm-voice-panel #addMusicBtn i {
  color: var(--axm-orange-text) !important;
}
html .axm-voice-panel #syncSpeakersBtn:hover {
  border-color: var(--axm-orange) !important;
  color: var(--axm-orange-text) !important;
}
html .axm-voice-panel .axm-wf-acc-toggle--chevron:hover {
  border-color: var(--axm-orange) !important;
}
html .axm-voice-panel .axm-wf-acc-toggle--chevron.is-open,
html .axm-voice-panel .axm-wf-acc-toggle--chevron[aria-expanded="true"] {
  border-color: var(--axm-orange) !important;
  background: var(--axm-orange-tint) !important;
  color: var(--axm-orange-text) !important;
}
html .axm-voice-panel .axm-wf-acc-toggle--chevron.is-open .axm-wf-acc-chevron {
  color: var(--axm-orange-text) !important;
}
html .axm-voice-panel input:focus,
html .axm-voice-panel select:focus,
html .axm-voice-panel textarea:focus {
  border-color: var(--axm-orange) !important;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18) !important;
  outline: none;
}
html .axm-voice-panel button:focus-visible,
html .axm-voice-panel a:focus-visible {
  outline: 2px solid var(--axm-orange) !important;
  outline-offset: 2px;
}
html .axm-voice-panel #addSpeakerBtn,
html .axm-voice-panel #axmHistoryToggle,
html .axm-voice-panel #axmMoreOptionsToggle {
  border-radius: 6px;
}
html .axm-voice-panel .axm-field-label,
html .axm-voice-panel .axm-history-section label {
  text-transform: capitalize !important;
  letter-spacing: 0.02em !important;
}
html .axm-voice-panel .axm-player-icon-btn:hover {
  color: var(--axm-orange-text) !important;
  border-color: var(--axm-orange) !important;
}
html .axm-voice-panel audio {
  background-color: var(--axm-surface-3, #2a3441) !important;
  border-radius: 999px !important;
}
html .axm-voice-panel audio::-webkit-media-controls-enclosure {
  background-color: var(--axm-surface-3, #2a3441) !important;
  border-radius: 999px !important;
}
html .axm-voice-panel audio::-webkit-media-controls-panel {
  background-color: transparent !important;
}
:is(html[data-bs-theme="dark"], html[data-theme="dark"]) .axm-voice-panel audio {
  color-scheme: dark;
}
html:not([data-theme="dark"]):not([data-bs-theme="dark"]) .axm-voice-panel audio {
  color-scheme: light;
}
@media (prefers-reduced-motion: no-preference) {
  html .axm-voice-panel #generateAudioBtn:not(:disabled) { animation: axm-atmo-glow 2.4s ease-in-out infinite; }
  html .axm-voice-panel .axm-wf-acc-toggle--chevron.is-open,
  html .axm-voice-panel .axm-wf-acc-toggle--chevron[aria-expanded="true"] { animation: axm-atmo-pulse 2.6s ease-in-out infinite; }
  html .axm-voice-panel #addMusicBtn:hover,
  html .axm-voice-panel #syncSpeakersBtn:hover { animation: axm-atmo-pulse 1.6s ease-out infinite; }
}

/* 22. Image Composition panel: slider beside the icons, orange accents, theme colors */
#addimage-panel,
#axmMoreToolsToggle {
  --axm-accent: #ea580c;
}
html #addimage-panel > .w-100 {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 0;
  align-items: center;
}
html #addimage-panel > .w-100 > * {
  grid-column: 1 / -1;
}
html #addimage-panel > .w-100 > .image-action-row {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 0;
}
html #addimage-panel > .w-100 > label.field-label {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  margin: 0 !important;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--axm-text-muted, #6b7280);
}
html #addimage-panel > .w-100 > .opacity-row {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  min-width: 0;
  margin: 0;
}
html #addimage-panel .opacity-label {
  display: none;
}
html #addimage-panel .opacity-slider {
  width: 100%;
  height: 18px;
}
html #addimage-panel .opacity-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: var(--axm-border-strong, #cbd2da);
}
html #addimage-panel .opacity-slider::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border-radius: 50%;
  background: #ea580c !important;
  border: none;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2) !important;
}
html #addimage-panel .opacity-slider::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: var(--axm-border-strong, #cbd2da);
}
html #addimage-panel .opacity-slider::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: #ea580c;
}
html #addimage-panel .opacity-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ea580c !important;
  border: none;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2) !important;
}
html #addimage-panel .opacity-slider:focus-visible {
  outline: 2px solid var(--axm-orange);
  outline-offset: 3px;
  border-radius: 4px;
}
html #addimage-panel .image-action-btn {
  border-radius: 8px;
  border-color: var(--axm-border-strong, #cbd2da);
}
html #addimage-panel .image-action-btn:hover {
  border-color: var(--axm-orange) !important;
  background: var(--axm-orange-tint) !important;
  color: var(--axm-text, inherit) !important;
}
html #addimage-panel #change-background-image-btn {
  background: var(--axm-orange-tint) !important;
  border-color: var(--axm-orange) !important;
  color: var(--axm-orange-text) !important;
}
html #addimage-panel #change-background-image-btn:hover {
  background: var(--axm-orange-tint2) !important;
  color: var(--axm-orange-text) !important;
}
html #addimage-panel #objLockBtn.active,
html #addimage-panel #objLockBtn.btn-outline-warning,
html #addimage-panel #set-as-background-btn.active {
  background: var(--axm-orange-tint) !important;
  border-color: var(--axm-orange) !important;
  color: var(--axm-orange-text) !important;
}
html #addimage-panel .image-action-btn:focus-visible {
  outline: 2px solid var(--axm-orange);
  outline-offset: 2px;
}
html #addimage-panel .transform-toggle {
  margin: 10px 0 8px;
}
html #addimage-panel .transform-toggle .chevron {
  color: var(--axm-text-muted, #6b7280);
}
html #addimage-panel .transform-toggle.open .chevron {
  color: var(--axm-orange-text);
}
html #addimage-panel .transform-toggle:focus-visible {
  outline: 2px solid var(--axm-orange);
  outline-offset: 2px;
}
html #addimage-panel .transform-field input {
  height: 32px;
  border-radius: 8px;
  border-color: var(--axm-border-strong, #cbd2da);
  font-size: 0.8rem;
}
html #addimage-panel .transform-field input:focus {
  border-color: var(--axm-orange);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18);
  outline: none;
}
html #addimage-panel .aspect-toggle,
html #addimage-panel .transform-grid--size .aspect-toggle {
  width: 34px;
  height: 32px;
  margin-bottom: 0;
  border-radius: 8px;
  border: 1px solid var(--axm-border-strong, #cbd2da);
  background: transparent;
  color: var(--axm-text-muted, #6b7280);
}
html #addimage-panel .aspect-toggle:hover,
html #addimage-panel .transform-grid--size .aspect-toggle:hover {
  border-color: var(--axm-orange);
  background: var(--axm-orange-tint);
  color: var(--axm-text, inherit);
}
html #addimage-panel .aspect-toggle.locked,
html #addimage-panel .transform-grid--size .aspect-toggle.locked {
  border-color: var(--axm-orange);
  background: var(--axm-orange-tint);
  color: var(--axm-orange-text);
}
html #addimage-panel .aspect-toggle:focus-visible {
  outline: 2px solid var(--axm-orange);
  outline-offset: 2px;
}
html #axmMoreToolsToggle {
  color: var(--axm-orange-text) !important;
  border-top: 1px solid var(--axm-border, #e2e5ea) !important;
}
html #axmMoreToolsToggle:hover {
  color: var(--axm-orange-text) !important;
  text-decoration: underline;
}
html #axmMoreToolsToggle:focus-visible {
  outline: 2px solid var(--axm-orange);
  outline-offset: 2px;
  border-radius: 6px;
}
@media (prefers-reduced-motion: no-preference) {
  html #addimage-panel .aspect-toggle.locked { animation: axm-atmo-pulse 2.6s ease-in-out infinite; }
}

/* ============================================================
   Perfect Pitch (Step 1: UI + trigger mechanics, dummy data)
   All classes namespaced axm-pp-*. Colors reuse the existing
   orange variables defined above in this file (--axm-orange,
   --axm-orange-text, --axm-orange-tint, --axm-orange-tint2)
   and the app surface variables from studio-theme.css
   (--axm-surface, --axm-surface-2, --axm-surface-3, --axm-border,
   --axm-text, --axm-text-muted). No new colors are hardcoded.
   ============================================================ */

/* Toolbar button (class did not previously exist; styled with existing surface vars) */
.axm-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--axm-border, #cbd5e1);
  background: var(--axm-surface-2, #f8fafc);
  color: var(--axm-text, #1f2937);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.axm-btn-secondary:hover {
  background: var(--axm-surface-3, #eef2f7);
  border-color: var(--axm-border-strong, #94a3b8);
  color: var(--axm-text, #111);
}

/* Floating selection pill above the selected word in the script editor */
.axm-pp-selection-pill {
  /* Fixed, not absolute: the pill lives at the end of <body> (no positioned
     ancestor near the editor), so absolute would resolve left/top against the
     document and pin it near the top of the page. Fixed uses viewport coords,
     which is exactly what positionPill() feeds it (getBoundingClientRect). */
  position: fixed;
  z-index: 1080;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--axm-orange);
  background: var(--axm-surface, #fff);
  color: var(--axm-orange-text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
  line-height: 1.4;
}
.axm-pp-selection-pill.is-visible { display: inline-flex; }
.axm-pp-selection-pill:hover {
  background: var(--axm-orange-tint2);
  color: var(--axm-orange-text);
}
.axm-pp-selection-pill i { font-size: 11px; }

/* Perfect Pitch modal */
#axmPerfectPitchModal .modal-dialog {
  max-width: 660px;
}
#axmPerfectPitchModal .modal-content {
  background: var(--axm-surface, #fff);
  border: 1px solid var(--axm-border, #e5e7eb);
  border-radius: 20px;
  overflow: hidden;
  color: var(--axm-text, inherit);
}
#axmPerfectPitchModal .modal-header,
#axmPerfectPitchModal .modal-footer {
  border-color: var(--axm-border, #e5e7eb);
}
#axmPerfectPitchModal .modal-header {
  padding: 20px 32px;
}
#axmPerfectPitchModal .modal-body {
  padding: 32px;
}
#axmPerfectPitchModal .modal-footer {
  padding: 20px 32px;
}
/* Drag handle: header only */
.axm-pp-header {
  cursor: grab;
  user-select: none;
}
.axm-pp-header.is-dragging,
.axm-pp-header:active {
  cursor: grabbing;
}
#axmPerfectPitchModal .modal-dialog.is-dragging {
  transition: none;
}
.axm-pp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--axm-orange-text);
}
.axm-pp-eyebrow i { font-size: 0.8rem; }

/* Word display + Hold to Speak */
.axm-pp-word-block {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
}
.axm-pp-word-display {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}
.axm-pp-word-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--axm-text-muted, #6b7280);
  white-space: nowrap;
}
.axm-pp-word-display strong {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--axm-text, #1f2937);
  word-break: break-word;
  min-width: 0;
}
.axm-pp-speak-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--axm-orange);
  background: var(--axm-orange-tint);
  color: var(--axm-orange-text);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.axm-pp-speak-btn:hover { background: var(--axm-orange-tint2); }
/* Waveform: hidden by default; shown only while recording (JS class toggle) */
.axm-pp-waveform {
  display: none;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--axm-border, #e5e7eb);
  background: var(--axm-surface-2, #f8fafc);
}
.axm-pp-waveform.is-recording { display: inline-flex; }
.axm-pp-waveform-bar {
  width: 3px;
  height: 10px;
  border-radius: 2px;
  background: var(--axm-orange);
  transform-origin: center;
}
@media (prefers-reduced-motion: no-preference) {
  .axm-pp-waveform.is-recording .axm-pp-waveform-bar {
    animation: axm-pp-wave 0.6s ease-in-out infinite;
  }
  .axm-pp-waveform.is-recording .axm-pp-waveform-bar:nth-child(2) { animation-delay: 0.12s; }
  .axm-pp-waveform.is-recording .axm-pp-waveform-bar:nth-child(3) { animation-delay: 0.24s; }
  .axm-pp-waveform.is-recording .axm-pp-waveform-bar:nth-child(4) { animation-delay: 0.12s; }
  .axm-pp-waveform.is-recording .axm-pp-waveform-bar:nth-child(5) { animation-delay: 0s; }
}
@keyframes axm-pp-wave {
  0%, 100% { transform: scaleY(1); opacity: 0.5; }
  50% { transform: scaleY(2.2); opacity: 1; }
}

/* Suggestion cards: equal-width grid, content never drives column width */
.axm-pp-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 575.98px) {
  .axm-pp-cards { grid-template-columns: 1fr; }
}
.axm-pp-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 8px 10px 10px;
  border-radius: 10px;
  border: 1px solid var(--axm-border, #e5e7eb);
  background: var(--axm-surface-2, #f8fafc);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.axm-pp-card:hover { border-color: var(--axm-orange); }
.axm-pp-card.is-selected {
  border-color: var(--axm-orange);
  box-shadow: 0 0 0 1px var(--axm-orange), 0 0 12px rgba(234, 88, 12, 0.25);
}
.axm-pp-card-body { flex: 1 1 auto; min-width: 0; }
.axm-pp-card-phonetic {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--axm-text, inherit);
  margin-bottom: 6px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}
.axm-pp-card-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--axm-surface-3, #eef1f4);
  color: var(--axm-text-muted, #6b7280);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.axm-pp-card-side {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}
.axm-pp-card-play {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--axm-border, #e5e7eb);
  background: var(--axm-surface, #fff);
  color: var(--axm-text-muted, #6b7280);
  font-size: 9px;
  cursor: pointer;
}
.axm-pp-card-play:hover {
  border-color: var(--axm-orange);
  color: var(--axm-orange-text);
}
.axm-pp-card:focus-visible {
  outline: 2px solid var(--axm-orange);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  .axm-pp-card.is-selected { animation: axm-atmo-glow 2.4s ease-in-out infinite; }
}

/* Custom spelling row: collapsed behind a quiet toggle link */
.axm-pp-custom-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.axm-pp-custom-toggle {
  background: none;
  border: none;
  padding: 2px 0;
  font-size: 0.78rem;
  color: var(--axm-text-muted, #6b7280);
  cursor: pointer;
  text-decoration: none;
}
.axm-pp-custom-toggle:hover {
  color: var(--axm-orange-text);
  text-decoration: underline;
}
.axm-pp-custom-panel[hidden] {
  display: none !important;
}
.axm-pp-input-group {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
}
.axm-pp-input-group .axm-pp-custom-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.axm-pp-input-group .axm-pp-preview-btn {
  margin-left: -1px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.axm-pp-custom-row .form-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--axm-text-muted, #6b7280);
  margin-bottom: 0;
  white-space: nowrap;
}
.axm-pp-custom-input {
  flex: 1 1 auto;
  min-width: 0;
  background: var(--axm-surface-2, #f8fafc);
  border: 1px solid var(--axm-border, #e5e7eb);
  color: var(--axm-text, inherit);
  border-radius: 8px;
}
.axm-pp-custom-input:focus {
  border-color: var(--axm-orange);
  box-shadow: 0 0 0 3px var(--axm-orange-tint2);
  background: var(--axm-surface-2, #f8fafc);
  color: var(--axm-text, inherit);
}
.axm-pp-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--axm-border, #e5e7eb);
  background: var(--axm-surface-2, #f8fafc);
  color: var(--axm-text, inherit);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}
.axm-pp-preview-btn:hover {
  border-color: var(--axm-orange);
  color: var(--axm-orange-text);
}

/* Footer buttons */
.axm-pp-cancel-btn {
  background: transparent;
  border: 1px solid var(--axm-border, #e5e7eb);
  color: var(--axm-text, inherit);
  border-radius: 8px;
  font-weight: 600;
}
.axm-pp-cancel-btn:hover {
  background: var(--axm-surface-2, #f8fafc);
  color: var(--axm-text, inherit);
}
.axm-pp-apply-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--axm-orange-tint);
  border: 1px solid var(--axm-orange);
  color: var(--axm-orange-text);
  border-radius: 8px;
  font-weight: 700;
}
.axm-pp-apply-btn:hover {
  background: var(--axm-orange-tint2);
  border-color: var(--axm-orange);
  color: var(--axm-orange-text);
}
@media (prefers-reduced-motion: no-preference) {
  .axm-pp-apply-btn:not(:disabled) { animation: axm-atmo-glow 2.4s ease-in-out infinite; }
}

/* ============================================================
   Project Details toolbar (templates/main_content.php)
   - icon-only Expression / Perfect Pitch buttons
   - right-aligned action cluster (.axm-project-actions)
   - custom tooltip bubble (.axm-tip-bubble): hover + keyboard focus
   Everything is namespaced to .axm-project-toolbar / .axm-tip-* so no
   other row or component is affected. Colors reuse the studio-theme
   surface variables (--axm-surface-2, --axm-border, --axm-text); no new
   palette values are hardcoded.
   ============================================================ */

/* Action cluster. The "Project Details" label stays left on its own; the
   whole icon cluster is pushed right by the group's own auto margin (not
   by margins on the individual buttons). */
.axm-project-toolbar--header .axm-project-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin-left: auto;
}

/* The two converted buttons no longer carry a text label, so give them the
   same square 32px hit area as the copy / paste / delete icons. inline-flex
   is explicit because bootstrap's .btn is inline-block, where
   justify-content has no effect. */
.axm-project-toolbar--header .axm-project-actions > .axm-expr-toolbar-btn,
.axm-project-toolbar--header .axm-project-actions > .axm-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 32px;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* Custom tooltip bubble. Created and positioned by the inline script in
   templates/main_content.php (position: fixed + viewport coordinates, the
   same approach as .axm-pp-selection-pill above). Shown by adding
   .is-visible, so it appears instantly on hover and on keyboard focus -
   no transition and no hover-intent delay. */
.axm-tip-bubble {
  position: fixed;
  z-index: 1080;
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--axm-surface-2, #f8fafc);
  border: 1px solid var(--axm-border, #cbd5e1);
  color: var(--axm-text, #1f2937);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.28);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
.axm-tip-bubble.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Pointer/arrow: bottom edge by default (the bubble sits above the button) ... */
.axm-tip-bubble::after {
  content: "";
  position: absolute;
  left: var(--axm-tip-arrow-x, 50%);
  bottom: -4px;
  width: 7px;
  height: 7px;
  margin-left: -4px;
  background: inherit;
  border-right: 1px solid var(--axm-border, #cbd5e1);
  border-bottom: 1px solid var(--axm-border, #cbd5e1);
  transform: rotate(45deg);
}
/* ... flipped to the top edge when the trigger has no room above it. */
.axm-tip-bubble--below::after {
  bottom: auto;
  top: -4px;
  border-right: 0;
  border-bottom: 0;
  border-left: 1px solid var(--axm-border, #cbd5e1);
  border-top: 1px solid var(--axm-border, #cbd5e1);
}

/* Mobile keeps the existing left-aligned, wrapping toolbar layout. */
@media (max-width: 575.98px) {
  .axm-project-toolbar--header .axm-project-actions {
    margin-left: 0;
  }
}
