@use 'sass:meta';
@use 'variables' as *;

// Themes whose radio button focus ring is drawn with the base primary colour (Tailwind)
// declare $pptx-radio-focus-shadow so the ring follows the editor accent instead.
$pptx-has-radio-focus-shadow: meta.global-variable-exists('pptx-radio-focus-shadow');
@include export-module('pptxeditor-layout') {

  // source: components/_viewer-shell.scss
  // =============================================================================
  // VIEWER SHELL STYLES
  // =============================================================================
  // Root container and layout for the EJ2 PowerPoint Editor.
  
  .ej2-pptx-editor {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    color: $pptx-text-primary;
    background-color: $pptx-surface-bg;
    font-family: $pptx-font-family;
    font-size: $pptx-font-size-base;

    &.ej2-pptx-editor--fullscreen {
      width: 100%;
      height: 100%;
      background-color: $pptx-surface-bg;
    }
  }

  .ej2-pptx-shell {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .ej2-pptx-container {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: stretch;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    overflow: hidden;
    // The workspace (thumbnails list + slide area) must never size the editor.
    // Size containment ignores its content height, so when the host has no
    // definite height the editor stays a stable size (the intrinsic height
    // below) instead of growing with the slide count, and the thumbnail list
    // scrolls. With a definite host height the container simply fills it.
    contain: size;
    contain-intrinsic-height: max(320px, 70vh);
  }

  // Visually hidden polite live region for status announcements.
  .ej2-pptx-editor .ej2-pptx-live-region {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .ej2-pptx-editor .ej2-pptx-ribbon {
    flex: 0 0 auto;
    width: 100%;
    z-index: $pptx-z-ribbon;
  }

  .ej2-pptx-slide-panel {
    flex: 0 0 auto;
    z-index: $pptx-z-slide-panel;
    min-width: 0;
    // Thumbnail module owns internal scroll; collapsed chrome must not overlay main.
    overflow: hidden;
    align-self: stretch;
    height: auto;
    min-height: 0;

    &.ej2-pptx-slide-panel--collapsed {
      width: 0;
      min-width: 0;
      max-width: 0;
      overflow: hidden;
    }
  }

  .ej2-pptx-slide-area {
    flex: 1 1 auto;
    z-index: $pptx-z-slide-canvas;
    min-width: 0;
    min-height: 0;
    // Main slide viewport owns scroll; keep shell paint area from double-scrolling.
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .ej2-pptx-status-bar {
    flex: 0 0 auto;
    width: 100%;
    z-index: $pptx-z-status-bar;
  }

  // source: components/_ribbon.scss
  // =============================================================================
  // RIBBON UI STYLES (TASK-1007 â€” File tab + layout shell)
  // =============================================================================
  // Host layout only. EJ2 Ribbon owns internal tab/group/item chrome.
  // File, Home, Slide Show, View are fully populated tabs.

  .ej2-pptx-editor {
    .ej2-pptx-ribbon {
      position: relative;
      flex: 0 0 auto;
      width: 100%;
      // Do not clamp height to 0 â€” simplified ribbon needs room for group chrome.
      min-height: 3rem;
      box-sizing: border-box;
      border-bottom: none;
      background: $pptx-ribbon-bg-color;
      // Visible so tab content is never clipped by the host shell.
      overflow: visible;
    }

    .ej2-pptx-ribbon-control {
      width: 100%;
      min-height: 3rem;
    }

    .ej2-pptx-ribbon-file-input {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
      opacity: 0;
      pointer-events: none;
    }

    // File tab Info group: disabled metadata labels stay readable.
    .ej2-pptx-ribbon .e-ribbon-item.e-disabled .e-btn,
    .ej2-pptx-ribbon .e-disabled.e-btn {
      opacity: .85;
    }
  }

  // ---- Ribbon (EJ2 Ribbon): tab row, File menu, layout switcher, groups ----------
  .ej2-pptx-editor .ej2-pptx-ribbon.e-ribbon {
    border: 0;
    border-bottom: 1px solid $pptx-border-color;
    background: $pptx-ribbon-bg-color;
    padding: 0;
    box-sizing: border-box;

    // A minimised ribbon shows only the tab row, with no line under it.
    &.e-ribbon-minimize {
      border-bottom: 0;
    }

    // File sits on the same baseline as the Home / Slide Show / View tabs:
    // same height as the tab header, same font size and weight.
    .e-ribbon-file-menu.e-btn {
      display: inline-flex;
      align-items: center;
      height: 38px;
      line-height: 38px;
      padding: 0 12px;
      border: 0;
      background: transparent;
      box-shadow: none;
      color: $pptx-ribbon-tab-text-color;
      font-size: $pptx-ribbon-file-font-size;
      font-weight: $pptx-ribbon-file-font-weight;
      text-transform: none;
      vertical-align: top;

      &:hover,
      &:focus,
      &:focus-visible,
      &.e-active {
        background-color: $pptx-ribbon-hover-bg-color;
        // Same text colour on hover/focus as the Document Editor ribbon File button.
        color: $pptx-ribbon-tab-hover-color;
      }
    }

    // No extra offset: File -> Home spacing equals Home -> Slide Show -> View.
    .e-tab-header {
      margin-left: 0;
    }

    // No grey rule between the tab row and the ribbon group (EJ2 draws it as the
    // tab header's bottom border and a ::before/::after line).
    .e-tab-header,
    .e-tab-header.e-toolbar,
    .e-tab-header .e-toolbar-items {
      border-bottom: 0;
      border-bottom-color: transparent;
      box-shadow: none;
    }

    .e-tab-header::before,
    .e-tab-header::after,
    .e-tab-header.e-toolbar::before,
    .e-tab-header.e-toolbar::after,
    .e-tab-header .e-toolbar-items::before,
    .e-tab-header .e-toolbar-items::after {
      border-bottom: 0;
      border-bottom-color: transparent;
      box-shadow: none;
      background: transparent;
    }

    .e-tab-header,
    .e-tab-header .e-toolbar-items,
    .e-tab-header .e-toolbar-item,
    .e-tab-header .e-toolbar-item .e-tab-wrap {
      // Shorthand on purpose: it also clears the background-image that themes such as
      // Material 3 use for the tinted tab header, so the tabs match the File button.
      background: transparent;
    }

    // Tab labels use the Document Editor ribbon text size, weight and colours.
    .e-tab-header .e-toolbar-item .e-tab-wrap .e-tab-text {
      font-size: $pptx-ribbon-tab-font-size;
      font-weight: $pptx-ribbon-tab-font-weight;
      color: $pptx-ribbon-tab-text-color;
    }

    .e-tab-header .e-toolbar-item .e-tab-wrap:hover .e-tab-text {
      color: $pptx-ribbon-tab-hover-color;
    }

    .e-tab-header .e-toolbar-item.e-active .e-tab-wrap .e-tab-text {
      font-weight: $pptx-ribbon-active-tab-font-weight;
      color: $pptx-ribbon-active-tab-color;
    }

    // Only the selected tab shows the underline.
    .e-tab-header .e-toolbar-item:not(.e-active) .e-tab-wrap {
      border-bottom-color: transparent;
    }

    // Pressed state for toggle-like ribbon buttons (e.g. Fit to Window).
    .e-ribbon-item .e-btn.pptx-ribbon-btn-active {
      background-color: $pptx-ribbon-active-bg-color;
      border-radius: 4px;
      color: $pptx-ribbon-active-color;
    }

    .e-ribbon-item .e-btn.pptx-ribbon-btn-active .e-btn-icon,
    .e-ribbon-item .e-btn.pptx-ribbon-btn-active .e-icons {
      color: $pptx-ribbon-active-color;
    }

    // Font family / size dropdowns: white, bordered, rounded, with chevron.
    .e-ribbon-item .e-input-group.e-ddl {
      height: 30px;
      border: 1px solid $pptx-ribbon-input-border-color;
      border-radius: 4px;
      background-color: $pptx-ribbon-input-bg-color;
      box-shadow: none;

      input.e-input {
        font-size: $pptx-ribbon-input-font-size;
        color: $pptx-ribbon-text-color;
        background: transparent;
        // Logical padding: left in LTR, right in RTL.
        padding-inline-start: 8px;
      }

      // Font name / size are read-only indicators, so they show no drop-down chevron.
      .e-input-group-icon.e-ddl-icon {
        display: none;
      }

      &::before,
      &::after {
        display: none;
      }
    }

    // B / I / U / S use the same icon-font glyphs as the Document Editor ribbon. The button
    // text (B, I, U, S) stays in the DOM for assistive technology but is not painted.
    .ej2-pptx-ribbon-format {
      font-size: 0;
    }

    .ej2-pptx-ribbon-format::before {
      font-family: 'e-icons';
      font-size: 16px;
      font-style: normal;
      font-weight: normal;
      line-height: 1;
      text-decoration: none;
      color: $pptx-ribbon-icon-color;
    }

    .ej2-pptx-ribbon-format--b::before {
      content: $pptx-icon-bold;
    }

    .ej2-pptx-ribbon-format--i::before {
      content: $pptx-icon-italic;
    }

    .ej2-pptx-ribbon-format--u::before {
      content: $pptx-icon-underline;
    }

    .ej2-pptx-ribbon-format--s::before {
      content: $pptx-icon-strikethrough;
    }

    .ej2-pptx-ribbon-format--on::before {
      color: $pptx-ribbon-active-color;
    }

    // Font name / size boxes are read-only status indicators: never show a text caret.
    .ej2-pptx-ribbon-font-combo input.e-input {
      caret-color: transparent;
    }

    // "Read-only" lock label next to the format indicators.
    #pptx-ribbon-font-read-only {
      width: auto;
      padding: 0 8px;
      opacity: 1;
      color: $pptx-ribbon-text-color;

      &::after {
        content: 'Read-only';
        margin-left: 6px;
        font-size: $pptx-ribbon-item-font-size;
      }
    }

    // Chevron on the File button.
    .e-ribbon-file-menu .e-caret {
      margin-left: 6px;
      font-size: 10px;
    }

    // Selected tab: accent underline.
    .e-tab-header .e-indicator {
      background-color: $pptx-ribbon-indicator-color;
      height: 2px;
    }

    .e-ribbon-help-template {
      display: flex;
      align-items: center;
      // Same height as the tab row, so the Present button is centred on the tabs
      // in every theme (the Ribbon theme sizes this wrapper separately).
      height: $pptx-ribbon-tab-height;
      padding-top: 10px;
      // EJ2 paints this wrapper with a surface colour that shows as a white block
      // around the Present button; let the ribbon background show through.
      background: transparent;
    }

    // Command row: same surface as the tab row. The hairline under it is drawn on the ribbon
    // itself (below), because the Ribbon theme narrows the content by the collapse chevron's
    // width and a border on the content would stop before the chevron.
    .e-content,
    .e-ribbon-tab .e-content {
      margin-top: 0;
      border: 0;
      border-radius: 0;
      background: $pptx-ribbon-bg-color;
      box-shadow: none;
    }

    .e-ribbon-group-header {
      color: $pptx-ribbon-text-color;
      font-size: $pptx-ribbon-group-header-font-size;
      line-height: 1.2;
      text-align: center;
    }

    .ej2-pptx-ribbon-group-lock {
      margin-right: 4px;
      font-size: 11px;
    }

    // Read-only character-format indicators (B / I / U / S).
    .ej2-pptx-ribbon-format {
      min-width: 28px;
      height: 28px;
      padding: 0;
      cursor: default;
    }

    // Ribbon buttons are flat by default: no grey fill. Grey is reserved for the
    // selected / active state (see the e-active rule below).
    .e-ribbon-group .e-ribbon-item .e-btn,
    .e-content .e-ribbon-item .e-btn {
      border-radius: 4px;
      background-color: transparent;
      border: none;
      box-shadow: none;
      color: $pptx-ribbon-text-color;
      font-size: $pptx-ribbon-item-font-size;
      text-transform: none;

      .e-btn-icon,
      .e-icons {
        color: $pptx-ribbon-icon-color;
      }

      &:hover:not(:disabled) {
        background-color: $pptx-ribbon-hover-bg-color;
        color: $pptx-ribbon-hover-color;

        .e-btn-icon,
        .e-icons {
          color: $pptx-ribbon-hover-color;
        }
      }
    }

    // Mode-specific item sizing: classic cards ~66px tall, simplified ~27px
    // (EJ2 sets e-ribbon-simplified-mode on the host; classic is its absence).
    .e-content .e-ribbon-item .e-btn {
      height: 66px;
      min-height: 66px;
    }

    // Small format indicators (B / I / U / S) stay compact in both layouts.
    .e-content .e-ribbon-item .e-btn.ej2-pptx-ribbon-format {
      height: 30px;
      min-height: 30px;
      min-width: 30px;
    }
    // Font group is view-only: indicators and the family / size boxes show the
    // selected slide text formatting but never react to the pointer.
    .e-content .e-ribbon-item .e-btn.ej2-pptx-ribbon-format {
      pointer-events: none;
      user-select: none;
    }

    .e-content .e-ribbon-item .e-input-group.e-ddl {
      cursor: default;

      input.e-input,
      .e-input-group-icon {
        cursor: default;
        pointer-events: none;
      }
    }

    &.e-ribbon-simplified-mode .e-content .e-ribbon-item .e-btn {
      height: 27px;
      min-height: 27px;
    }

    // Selected / active state (Notes, Thumbnails visible; B/I/U/S indicators on):
    // the only ribbon buttons that get the grey fill.
    .e-content .e-ribbon-item .e-btn.e-active,
    .e-content .e-ribbon-item .e-btn.ej2-pptx-ribbon-format--on {
      background-color: $pptx-ribbon-active-bg-color;
      border: none;
      color: $pptx-ribbon-active-color;
    }

    .e-content .e-ribbon-item .e-btn.e-active .e-btn-icon,
    .e-content .e-ribbon-item .e-btn.e-active .e-icons,
    .e-content .e-ribbon-item .e-btn.ej2-pptx-ribbon-format--on .e-btn-icon,
    .e-content .e-ribbon-item .e-btn.ej2-pptx-ribbon-format--on .e-icons {
      color: $pptx-ribbon-active-color;
    }
  }

  // Present split button (right side of the ribbon tab row): outlined "Present"
  // button with a monitor icon and a separate outlined chevron button.
  .e-split-btn-wrapper.ej2-pptx-ribbon-present-btn {
    display: inline-flex;
    gap: 0;
    // EJ2 draws a drop shadow on the wrapper; it reads as a grey line under the button.
    box-shadow: none;

    .e-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 32px;
      padding: 0 14px;
      border: 1px solid $pptx-ribbon-input-border-color;
      border-radius: 4px;
      // Same surface and text/icon colour as the ribbon the button sits on.
      background: transparent;
      box-shadow: none;
      color: $pptx-ribbon-text-color;
      font-size: $pptx-ribbon-tab-font-size;
      font-weight: $pptx-ribbon-tab-font-weight;
      text-transform: none;

      &:hover,
      &:focus {
        background-color: $pptx-ribbon-hover-bg-color;
        color: $pptx-ribbon-hover-color;
        box-shadow: none;
      }

      &:disabled,
      &.e-disabled {
        opacity: .55;
      }
    }

    // One joined control: the Present button's right border is the vertical divider
    // between it and the drop-down; the drop-down has no left border of its own.
    .e-btn:first-child {
      border-top-right-radius: 0;
      border-bottom-right-radius: 0;
    }

    .e-btn:last-child {
      margin-left: 0;
      padding: 0 8px;
      min-width: 30px;
      border-left-width: 0;
      border-top-left-radius: 0;
      border-bottom-left-radius: 0;
    }

    .e-btn:hover,
    .e-btn:focus {
      position: relative;
      z-index: 1;
    }
  }

  // Outline (unfilled) chevron instead of EJ2's filled triangle for the View zoom
  // drop-down and the Present split button. The font glyph is hidden and replaced by a
  // masked stroke chevron.
  .ej2-pptx-editor .ej2-pptx-ribbon .e-ribbon-item .e-dropdown-btn:not(.e-ribbon-file-menu) .e-caret,
  .ej2-pptx-editor .e-split-btn-wrapper.ej2-pptx-ribbon-present-btn .e-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 12px;
    width: 12px;
    min-width: 12px;
    height: 12px;
    margin: 0;
    padding: 0;
    font-size: 0;
    line-height: 0;

    &::before {
      content: '';
      display: block;
      width: 12px;
      height: 12px;
      background-color: currentcolor;
      mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6'/%3E%3C/svg%3E") center / contain no-repeat;
    }
  }

  .ej2-pptx-ribbon-present-host {
    display: inline-flex;
    align-items: center;
  }

  // Monitor-with-play icon used by the Present button. Sized to match the 20px
  // ribbon icons; the `.e-btn .e-btn-icon` selector outranks EJ2's 14px icon rule.
  .e-split-btn-wrapper.ej2-pptx-ribbon-present-btn .e-btn .e-btn-icon.ej2-pptx-icon-present,
  .ej2-pptx-icon-present {
    display: inline-block;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin: 0 8px 0 0;
    padding: 0;
    font-size: 20px;
    line-height: 20px;
    vertical-align: middle;
    background-color: currentcolor;
    mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='18' height='12' rx='1.5' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M10.5 6v6l4.5-3z' fill='%23000'/%3E%3Cpath d='M12 15v4M8 21l4-2 4 2' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  .e-dropdown-popup.ej2-pptx-ribbon-present-btn {
    border-radius: 8px;
    box-shadow: $pptx-shadow-lg;

    ul .e-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 0 16px;

      .e-menu-icon,
      .e-btn-icon {
        position: static;
        display: inline-block;
        flex: 0 0 20px;
        width: 20px;
        height: 20px;
        min-width: 20px;
        margin: 0;
        padding: 0;
        font-size: 20px;
        line-height: 20px;
        vertical-align: middle;
      }
    }
  }

  // Slide Show / View command icons (play, play-current, presenter).
  .e-ribbon-icon-pptx {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: currentColor;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;

    &.pptx-icon-play {
      mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15l12-7.5z' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
    }

    &.pptx-icon-play-current {
      mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='18' height='16' rx='2' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M10 8.5v7l5.5-3.5z' fill='%23000'/%3E%3C/svg%3E");
    }

    &.pptx-icon-presenter {
      mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='18' height='12' rx='1.5' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M10.5 6v6l4.5-3z' fill='%23000'/%3E%3Cpath d='M12 15v4M8 21l4-2 4 2' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    }

    &.pptx-icon-notes {
      mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6z'/%3E%3Cpath d='M14 3v4h4M9 12h6M9 16h6'/%3E%3C/svg%3E");
    }

    &.pptx-icon-thumbnails {
      mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='7' height='7' rx='1'/%3E%3Crect x='3' y='13' width='7' height='7' rx='1'/%3E%3Crect x='13' y='4' width='8' height='16' rx='1'/%3E%3C/svg%3E");
    }

    &.pptx-icon-zoom {
      mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E");
    }

    &.pptx-icon-fit-window {
      mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8V3h5M16 3h5v5M21 16v5h-5M8 21H3v-5'/%3E%3C/svg%3E");
    }
  }

  // ---- Zoom dialog (View -> Zoom -> Zoom...) -----------------------------------
  .e-dlg-container.ej2-pptx-zoom-dialog .e-dialog {
    width: 376px;
    border-radius: 10px;
  }

  .e-dlg-container.ej2-pptx-zoom-dialog .e-footer-content .e-btn.ej2-pptx-zoom-dialog__ok.e-primary.e-flat:not([disabled]):not(.e-success):not(.e-danger):not(.e-warning):not(.e-info) {
    background-color: $pptx-accent;
    border-color: $pptx-accent;
    color: $pptx-on-accent;
  }

  .ej2-pptx-zoom-dialog {
    .e-dlg-header {
      font-size: 15px;
      font-weight: 600;
    }

    .ej2-pptx-zoom-dialog__body {
      display: flex;
      flex-direction: column;
      gap: 10px;
      padding: 4px 0;
    }

    .ej2-pptx-zoom-dialog__row {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .ej2-pptx-zoom-dialog__unit {
      color: $pptx-text-secondary;
    }

    .e-footer-content {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
    }

    .e-radio:checked + label::before {
      border-color: $pptx-accent;
    }

    .e-radio:checked + label::after {
      background-color: $pptx-accent;
    }

    @if $pptx-has-radio-focus-shadow {
      .e-radio:focus + label::before {
        box-shadow: $pptx-radio-focus-shadow;
      }

      .e-radio:checked:focus + label::before {
        border-color: $pptx-accent;
        background-color: $pptx-bg-color;
      }

      .e-radio:checked:focus + label::after {
        background-color: $pptx-accent;
      }
    }

    .ej2-pptx-zoom-dialog__ok.e-btn {
      min-width: 70px;
      height: 32px;
      border-radius: 4px;
      background-color: $pptx-accent;
      border-color: $pptx-accent;
      color: $pptx-on-accent;
    }

    .ej2-pptx-zoom-dialog__cancel.e-btn {
      min-width: 90px;
      height: 32px;
      border-radius: 4px;
      background-color: transparent;
      border: 1px solid $pptx-border-strong;
      color: $pptx-text-primary;
    }
  }

  // source: components/_help-dialog.scss
  // Help tab dialog content (Keyboard Shortcuts / About)

  .ej2-pptx-help-dialog {
    font-size: .875rem;
    line-height: 1.45;
    color: inherit;
  }

  .ej2-pptx-help-dialog__intro,
  .ej2-pptx-help-dialog__product,
  .ej2-pptx-help-dialog__version,
  .ej2-pptx-help-dialog__license {
    margin: 0 0 .75rem;
  }

  .ej2-pptx-help-dialog__product {
    font-weight: 600;
    font-size: 1rem;
  }

  .ej2-pptx-help-dialog__table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
  }

  .ej2-pptx-help-dialog__table th,
  .ej2-pptx-help-dialog__table td {
    text-align: start;
    padding: .35rem .5rem;
    border-bottom: 1px solid $pptx-border-color;
    vertical-align: top;
  }

  .ej2-pptx-help-dialog__table th {
    font-weight: 600;
  }

  // source: components/_load-ui.scss
  .ej2-pptx-load-ui {
    position: absolute;
    inset: 0;
    z-index: $pptx-z-modal;
    pointer-events: none;
  }

  .ej2-pptx-load-panel,
  .ej2-pptx-load-error {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: $pptx-spacing-md;
    min-width: min(24rem, calc(100% - 2rem));
    max-width: calc(100% - 2rem);
    padding: $pptx-spacing-xl;
    box-sizing: border-box;
    pointer-events: auto;
    color: $pptx-text-primary;
    background: $pptx-surface-bg;
    border: $pptx-border-width solid $pptx-border-color;
    border-radius: 4px;
    box-shadow: $pptx-shadow-lg;
  }

  .ej2-pptx-load-panel[hidden],
  .ej2-pptx-load-error[hidden] {
    display: none;
  }

  .ej2-pptx-load-panel progress {
    width: 100%;
    min-height: 1rem;
    accent-color: $pptx-primary-color;
  }

  .ej2-pptx-load-error h2,
  .ej2-pptx-load-error p {
    margin: 0;
  }

  .ej2-pptx-load-error [data-load-error-code] {
    color: $pptx-error-color;
    font-family: $pptx-font-family-mono;
    font-weight: $pptx-font-weight-semibold;
  }

  .ej2-pptx-load-actions {
    display: flex;
    flex-wrap: wrap;
    gap: $pptx-spacing-sm;
  }

  .ej2-pptx-load-ui .e-btn:focus-visible {
    outline: 3px solid $pptx-primary-color;
    outline-offset: $pptx-focus-ring-offset;
  }

  [data-theme = 'highcontrast'] .ej2-pptx-load-panel,
  [data-theme = 'highcontrast'] .ej2-pptx-load-error {
    border-width: $pptx-border-width-thick;
    box-shadow: none;
  }

  // source: components/_slide-panel.scss
  // =============================================================================
  // SLIDE PANEL / THUMBNAIL SIDEBAR (TASK-1013)
  // =============================================================================
  // Left sidebar: lazy HTML/CSS/SVG thumbs (never canvas), 1-based numbers,
  // active accent border, drag/keyboard resize (120-240 px).
  // Expand/collapse is owned by the View tab â€” no panel chevron.

  .ej2-pptx-slide-panel {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    // `height: auto` (not 100%) so align-self: stretch fills the row when the
    // host height is auto/min-height; a percentage height would collapse the
    // pane to its content (single-slide white gap).
    align-self: stretch;
    height: auto;
    min-height: 0;
    min-width: 0;
    box-sizing: border-box;
    background: $pptx-slide-workspace-bg;
    border-inline-end: 1px solid $pptx-border-color;
    overflow: hidden;
    position: relative;
    z-index: $pptx-z-slide-panel;

    &.ej2-pptx-slide-panel--collapsed {
      width: 0;
      min-width: 0;
      max-width: 0;
      border-inline-end: none;
      overflow: hidden;
    }

    &.ej2-pptx-slide-panel--resizing {
      user-select: none;

      + .ej2-pptx-slide-area {
        user-select: none;
        pointer-events: none;
      }
    }
  }

  // ---------------------------------------------------------------- Thumbnails
  .ej2-pptx-thumbnail-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    min-width: 0;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    background: $pptx-chrome-bg;
    border-inline-end: 1px solid $pptx-border-color;
  }

  .ej2-pptx-thumbnail-panel__list {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    min-height: 0;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    padding-block: 12px;
    padding-inline: 8px 16px;
    scrollbar-gutter: stable;
  }

  // Themed scrollbars for the shell scroll containers.
  .ej2-pptx-thumbnail-panel__list,
  .ej2-pptx-main-slide__viewport,
  .ej2-pptx-notes-pane__body {
    scrollbar-color: $pptx-scrollbar-thumb $pptx-scrollbar-track;
    scrollbar-width: thin;
  }

  .ej2-pptx-thumbnail-panel__item {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  // Slide number: small, gray, in a narrow column left of the card;
  // red + semibold for the active slide.
  .ej2-pptx-thumbnail-panel__number {
    flex: 0 0 14px;
    width: 14px;
    padding-top: 2px;
    font-family: $pptx-font-family;
    font-size: 12px;
    font-weight: normal;
    line-height: 16px;
    color: $pptx-text-secondary;
    text-align: start;
    user-select: none;
  }

  .ej2-pptx-thumbnail-panel__item--active .ej2-pptx-thumbnail-panel__number {
    color: $pptx-accent;
    font-weight: 600;
  }

  .ej2-pptx-thumbnail-panel__thumb {
    display: block;
    // Share the row with the slide number instead of overflowing (and being clipped).
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    box-sizing: border-box;
    color: inherit;
    font: inherit;
    overflow: visible;

    &:hover:not(.ej2-pptx-thumbnail-panel__thumb--active) {
      border-color: $pptx-border-color;
    }

    &:focus {
      outline: none;
    }

    &:focus-visible:not(.ej2-pptx-thumbnail-panel__thumb--active) {
      outline: 2px solid $pptx-accent;
      outline-offset: 2px;
    }

    &.ej2-pptx-thumbnail-panel__thumb--active {
      border-color: $pptx-thumbnail-active-border;
      background-color: transparent;
      outline: none;
    }
  }

  .ej2-pptx-thumbnail-panel__frame {
    position: relative;
    flex: 0 0 auto;
    box-sizing: border-box;
    overflow: hidden;
    background-color: $pptx-surface-white;
    display: block;
    width: 100%;
    max-width: 100%;
    border: 1px solid $pptx-border-color;
    border-radius: 4px;
  }

  .ej2-pptx-thumbnail-panel__content {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transform-origin: top left;
    pointer-events: none;
    user-select: none;
  }

  .ej2-pptx-thumbnail-panel__placeholder,
  .ej2-pptx-thumbnail-panel__surface {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background-color: $pptx-surface-white;
    background-image: none;
  }

  .ej2-pptx-thumbnail-panel__resize {
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    bottom: 0;
    width: 4px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: col-resize;
    z-index: 2;
    box-sizing: border-box;
    touch-action: none;

    // The resize handle stays invisible on hover; only keyboard focus shows an outline.
    &:hover,
    &:focus-visible {
      background-color: transparent;
    }

    &:focus {
      outline: none;
    }

    &:focus-visible {
      outline: 2px solid $pptx-accent;
      outline-offset: -2px;
    }

    &[hidden] {
      display: none;
    }
  }

  .ej2-pptx-thumbnail-panel--collapsed {
    .ej2-pptx-thumbnail-panel__list,
    .ej2-pptx-thumbnail-panel__resize {
      display: none;
    }
  }

  // source: components/_slide-canvas.scss
  // =============================================================================
  // SLIDE CANVAS / MAIN SLIDE AREA (TASK-1012)
  // =============================================================================
  // Viewport background #F3F2F1 (shared with thumbnails); slide frame white + shadow.
  // Content is future HTML/CSS/SVG slide markup â€” never canvas for slide content.

  .ej2-pptx-slide-area {
    display: flex;
    flex-direction: column;
    // Inner viewport owns scrolling so fit modes can avoid unnecessary bars.
    overflow: hidden;
  }

  .ej2-pptx-main-slide {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    position: relative;
  }

  .ej2-pptx-main-slide__viewport {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    // Workspace behind the white slide card matches the thumbnail strip.
    background: $pptx-slide-workspace-bg;
    box-sizing: border-box;
    position: relative;
  }

  .ej2-pptx-main-slide__center {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    // min dimensions ensure centering when frame is smaller than viewport;
    // when frame is larger, center grows and viewport scrolls.
    min-width: 100%;
    min-height: 100%;
    width: max-content;
    height: max-content;
    padding: 24px;
  }

  .ej2-pptx-main-slide__frame {
    position: relative;
    flex: 0 0 auto;
    box-sizing: border-box;
    background-color: $pptx-surface-bg;
    border: 1px solid $pptx-border-color;
    box-shadow: $pptx-slide-shadow;
    overflow: hidden;
  }

  .ej2-pptx-main-slide__content {
    position: relative;
    box-sizing: border-box;
    transform-origin: top left;
    // Default: allow selecting rendered text when host enables it.
    user-select: text;
  }

  .ej2-pptx-slide-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
  }

  .ej2-pptx-text-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
  }

  .ej2-pptx-text-box {
    position: absolute;
    // PowerPoint text normally paints beyond the authored shape bounds. The
    // slide viewport remains the clipping boundary, not the text box.
    overflow: visible;
    box-sizing: border-box;
    transform-origin: center;
    pointer-events: auto;
    color: $pptx-slide-text-color;
  }

  .ej2-pptx-text-line {
    position: absolute;
    margin: 0;
    padding: 0;
    white-space: pre;
    text-rendering: geometricPrecision;
  }

  .ej2-pptx-main-slide--no-text-select,
  .ej2-pptx-main-slide--no-text-select .ej2-pptx-main-slide__content {
    user-select: none;
  }

  .ej2-pptx-main-slide__watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
    margin: 0;
    padding: 1rem;
    box-sizing: border-box;
    color: color-mix(in srgb, #{$pptx-text-primary}, transparent 82%);
    font-size: clamp(1.25rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: .08em;
    text-align: center;
    text-transform: uppercase;
    white-space: pre-wrap;
    word-break: break-word;
    user-select: none;
  }

  .ej2-pptx-main-slide__watermark--hidden {
    display: none;
  }

  .ej2-pptx-main-slide__context-menu {
    // Host element for EJ2 ContextMenu; positioned by the control.
    list-style: none;
    margin: 0;
    padding: 0;
  }

  // source: components/_status-bar.scss
  // =============================================================================
  // STATUS BAR STYLES
  // =============================================================================
  // ‹ Slide N of M ›  |  Notes  slideshow | − slider + %  fit-to-window

  .ej2-pptx-status-bar {
    height: $pptx-status-bar-height;
    min-height: $pptx-status-bar-height;
    background: $pptx-chrome-bg;
    border-top: 1px solid $pptx-border-color;
    color: $pptx-status-text-color;
    font-family: $pptx-font-family;
    font-size: 13px;
    line-height: 20px;
    user-select: none;
  }

  .ej2-pptx-status-bar__inner {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 6px;
    gap: 8px;
    box-sizing: border-box;
  }

  .ej2-pptx-status-bar__left {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 6px;
  }

  .ej2-pptx-status-bar__slide-nav {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: $pptx-status-icon-color;
    font-size: 16px;
    line-height: 22px;
    cursor: pointer;

    &:hover:not(:disabled) {
      background: $pptx-status-hover-bg-color;
      color: $pptx-status-hover-color;
    }

    &:disabled {
      opacity: .4;
      cursor: default;
    }

    &:focus-visible {
      outline: 2px solid $pptx-accent;
    }
  }

  .ej2-pptx-status-bar__counter {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: $pptx-status-text-color;
  }

  .ej2-pptx-status-bar__right {
    display: flex;
    align-items: center;
    margin-inline-start: auto;
    gap: 6px;
    flex: 0 0 auto;
  }

  .ej2-pptx-status-bar__divider {
    flex: 0 0 auto;
    width: 1px;
    height: 18px;
    margin: 0 4px;
    background: $pptx-border-color;
  }

  .ej2-pptx-status-bar__notes,
  .ej2-pptx-status-bar__slideshow,
  .ej2-pptx-status-bar__zoom-btn,
  .ej2-pptx-status-bar__fit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0;
    color: $pptx-status-icon-color;
    font-family: inherit;
    cursor: pointer;
    flex: 0 0 auto;

    svg {
      display: block;
      flex: 0 0 auto;
    }

    &:hover:not(:disabled) {
      background: $pptx-status-hover-bg-color;
      color: $pptx-status-hover-color;
    }

    &:focus-visible {
      outline: 2px solid $pptx-accent;
      outline-offset: 1px;
    }

    &:disabled {
      opacity: .45;
      cursor: default;
    }
  }

  .ej2-pptx-status-bar__notes {
    gap: 6px;
    height: 26px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    font-size: 13px;
    white-space: nowrap;
  }

  .ej2-pptx-status-bar__notes--active,
  .ej2-pptx-status-bar__notes--active:hover:not(:disabled) {
    background: $pptx-status-active-bg-color;
    border-color: transparent;
    color: $pptx-status-active-color;
  }

  .ej2-pptx-status-bar__notes-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
  }

  .ej2-pptx-status-bar__slideshow {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
  }

  .ej2-pptx-status-bar__zoom-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: $pptx-status-icon-color;
    font-size: 16px;
    line-height: 22px;
  }

  .ej2-pptx-status-bar__fit {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
  }

  .ej2-pptx-status-bar__slider {
    position: relative;
    width: 110px;
    height: 20px;
    padding: 0 7px;
    box-sizing: border-box;
    cursor: pointer;
    flex: 0 0 auto;

    &:focus-visible {
      outline: 2px solid $pptx-accent;
      outline-offset: 1px;
    }
  }

  .ej2-pptx-status-bar__zoom-disabled {
    opacity: .45;
    cursor: default;
  }

  .ej2-pptx-status-bar__slider-track {
    position: absolute;
    left: 7px;
    right: 7px;
    top: 50%;
    height: 3px;
    margin-top: -1.5px;
    background: $pptx-scrollbar-thumb;
    border-radius: 2px;
  }

  .ej2-pptx-status-bar__slider-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: $pptx-accent;
    border-radius: 2px;
  }

  .ej2-pptx-status-bar__slider-thumb {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    margin-left: -7px;
    border-radius: 50%;
    background: $pptx-accent;
    border: 2px solid $pptx-surface-bg;
    box-shadow: 0 0 0 1px color-mix(in srgb, #{$pptx-accent}, transparent 65%);
    box-sizing: border-box;
  }

  .ej2-pptx-status-bar__zoom-label {
    min-width: 36px;
    font-size: 13px;
    text-align: end;
    font-variant-numeric: tabular-nums;
    color: $pptx-status-text-color;
  }

  .ej2-pptx-status-bar__inner--compact {
    .ej2-pptx-status-bar__divider,
    .ej2-pptx-status-bar__fit,
    .ej2-pptx-status-bar__zoom-btn,
    .ej2-pptx-status-bar__slider,
    .ej2-pptx-status-bar__zoom-label {
      display: none;
    }
  }

  // source: components/_notes-pane.scss
  // =============================================================================
  // NOTES PANE (read-only, below the slide canvas; toggled from the status bar)
  // =============================================================================

  // The pane is a flex child of .ej2-pptx-slide-area, so the main slide viewport
  // shrinks (never overlaps) while it is open. Logical properties keep RTL correct.
  .ej2-pptx-notes-pane {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    min-height: 0;
    background: $pptx-chrome-bg;
    border-top: 1px solid $pptx-border-color;
    color: $pptx-text;
    font-family: $pptx-font-family;
    font-size: 14px;
    line-height: 20px;
  }

  .ej2-pptx-notes-pane--expanded {
    height: $pptx-notes-pane-height;
    max-height: 50%;
  }

  .ej2-pptx-notes-pane__header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding-inline: 16px 4px;
    background: transparent;
  }

  .ej2-pptx-notes-pane__title {
    flex: 1 1 auto;
    font-family: $pptx-font-family;
    font-size: 13px;
    font-weight: normal;
    color: $pptx-text-secondary;
  }

  .ej2-pptx-notes-pane__body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 4px 16px 12px;
    overflow-x: hidden;
    overflow-y: auto;
    overflow-wrap: anywhere;
    user-select: text;
    color: $pptx-text;

    &:focus-visible {
      outline: 2px solid $pptx-accent;
      outline-offset: -2px;
    }
  }

  .ej2-pptx-notes-pane__paragraph {
    margin: 0 0 4px;
    white-space: pre-wrap;
  }

  .ej2-pptx-notes-pane__empty {
    margin: 0;
    color: $pptx-text-secondary;
    font-style: italic;
  }

  @media (max-width: 767.98px) {
    .ej2-pptx-notes-pane--expanded {
      height: $pptx-notes-pane-height-compact;
    }

    .ej2-pptx-status-bar__notes-label,
    .ej2-pptx-status-bar__divider,
    .ej2-pptx-status-bar__fit,
    .ej2-pptx-status-bar__zoom-btn,
    .ej2-pptx-status-bar__slider,
    .ej2-pptx-status-bar__zoom-label {
      display: none;
    }
  }

  @media (forced-colors: active) {
    .ej2-pptx-status-bar__notes--active,
    .ej2-pptx-status-bar__notes--active:hover:not(:disabled) {
      background: Highlight;
      color: HighlightText;
      forced-color-adjust: none;
    }

    .ej2-pptx-notes-pane {
      border-top-color: CanvasText;
    }

    .ej2-pptx-notes-pane__body:focus-visible,
    .ej2-pptx-status-bar__notes:focus-visible {
      outline-color: Highlight;
    }
  }

  // =============================================================================
  // SLIDESHOW MODE - replaces `.ej2-pptx-slideshow*` / `.ej2-pptx-presenter*` rules
  // (from `.ej2-pptx-slideshow {` through the forced-colors media block).
  // =============================================================================
  .ej2-pptx-slideshow {
    background: $pptx-slideshow-bg;
    color: $pptx-slideshow-fg;
    cursor: default;
    font-family: $pptx-font-family;
    inset: 0;
    outline: none;
    overflow: hidden;
    position: fixed;
    user-select: none;
    z-index: calc(#{$pptx-z-modal} + 10);
  }

  .ej2-pptx-slideshow--idle {
    cursor: none;
  }

  .ej2-pptx-slideshow__stage {
    inset: 0;
    position: absolute;
  }

  .ej2-pptx-slideshow--presenter .ej2-pptx-slideshow__stage {
    visibility: hidden;
  }

  .ej2-pptx-slideshow__slide {
    background: $pptx-slideshow-slide-bg;
    left: 50%;
    position: absolute;
    top: 50%;
    transform-origin: center center;
  }

  .ej2-pptx-slideshow__slide .ej2-pptx-thumbnail-panel__surface {
    left: 0;
    position: absolute;
    top: 0;
    transform-origin: top left;
  }

  .ej2-pptx-slideshow__end {
    align-items: center;
    color: $pptx-slideshow-fg-muted;
    display: flex;
    font-size: $pptx-font-size-base;
    inset: 0;
    justify-content: center;
    position: absolute;
  }

  .ej2-pptx-slideshow__end[hidden] {
    display: none;
  }

  .ej2-pptx-slideshow__live {
    height: 1px;
    overflow: hidden;
    position: absolute;
    width: 1px;
  }

  .ej2-pptx-slideshow__toast {
    background: $pptx-overlay-bg;
    border-radius: 8px;
    color: $pptx-overlay-fg;
    font-size: 13px;
    left: 50%;
    opacity: 1;
    padding: 8px 16px;
    pointer-events: none;
    position: absolute;
    top: 20px;
    transform: translateX(-50%);
    transition: opacity .25s ease;
    white-space: nowrap;
    z-index: 2;
  }

  .ej2-pptx-slideshow__toast--hidden {
    opacity: 0;
    visibility: hidden;
  }

  .ej2-pptx-slideshow__controls {
    align-items: center;
    background: $pptx-overlay-bg;
    border-radius: 10px;
    bottom: 22px;
    box-shadow: $pptx-shadow-lg;
    display: flex;
    gap: 4px;
    left: 50%;
    opacity: 1;
    padding: 6px 8px;
    position: absolute;
    transform: translateX(-50%);
    transition: opacity .25s ease;
    z-index: 2;
  }

  .ej2-pptx-slideshow--idle .ej2-pptx-slideshow__controls {
    opacity: 0;
    pointer-events: none;
  }

  .ej2-pptx-slideshow__counter {
    color: $pptx-overlay-fg;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    min-width: 56px;
    text-align: center;
  }

  .ej2-pptx-slideshow__divider {
    align-self: stretch;
    background: $pptx-overlay-fg;
    margin: 4px 6px;
    width: 1px;
  }

  .ej2-pptx-slideshow__btn {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: $pptx-overlay-fg;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 20px;
    height: 36px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 36px;
  }

  .ej2-pptx-slideshow__btn:hover:not(:disabled) {
    background: $pptx-overlay-hover;
  }

  .ej2-pptx-slideshow__btn:focus-visible,
  .ej2-pptx-presenter__icon-btn:focus-visible,
  .ej2-pptx-presenter__square-btn:focus-visible,
  .ej2-pptx-presenter__nav-btn:focus-visible,
  .ej2-pptx-presenter__end-btn:focus-visible,
  .ej2-pptx-presenter__notes:focus-visible {
    outline: $pptx-border-width-thick solid $pptx-focus;
    outline-offset: 1px;
  }

  .ej2-pptx-slideshow__btn:disabled {
    cursor: default;
    opacity: .4;
  }

  // ---- Presenter view --------------------------------------------------------
  .ej2-pptx-presenter {
    background: $pptx-slideshow-presenter-bg;
    color: $pptx-presenter-fg;
    display: flex;
    flex-direction: column;
    font-family: $pptx-font-family;
    inset: 0;
    position: absolute;
    z-index: 3;
  }

  .ej2-pptx-presenter__header {
    align-items: center;
    background: $pptx-presenter-bg;
    border-bottom: 1px solid $pptx-presenter-border;
    box-sizing: border-box;
    display: flex;
    flex: none;
    gap: 16px;
    height: 126px;
    justify-content: space-between;
    padding: 0 24px;
  }

  .ej2-pptx-presenter__heading-block {
    min-width: 0;
  }

  .ej2-pptx-presenter__label {
    color: $pptx-presenter-fg-muted;
    font-size: 11px;
    font-weight: $pptx-font-weight-semibold;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  .ej2-pptx-presenter__label--end {
    text-align: end;
  }

  .ej2-pptx-presenter__title {
    color: $pptx-presenter-fg;
    font-size: 16px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ej2-pptx-presenter__header-actions {
    align-items: center;
    display: flex;
    gap: 12px;
  }

  .ej2-pptx-presenter__elapsed-block {
    margin-inline-end: 4px;
  }

  .ej2-pptx-presenter__timer {
    color: $pptx-presenter-fg;
    font-size: 26px;
    font-variant-numeric: tabular-nums;
    font-weight: $pptx-font-weight-semibold;
    line-height: 1.15;
    text-align: end;
  }

  .ej2-pptx-presenter__icon-btn,
  .ej2-pptx-presenter__square-btn,
  .ej2-pptx-presenter__nav-btn {
    background: transparent;
    border: 1px solid $pptx-presenter-border;
    color: $pptx-presenter-fg;
    cursor: pointer;
    font: inherit;
  }

  .ej2-pptx-presenter__icon-btn,
  .ej2-pptx-presenter__square-btn {
    align-items: center;
    border-radius: 4px;
    display: inline-flex;
    justify-content: center;
    padding: 0;
  }

  .ej2-pptx-presenter__icon-btn {
    height: 46px;
    width: 46px;
  }

  .ej2-pptx-presenter__square-btn {
    font-size: 12px;
    font-weight: $pptx-font-weight-semibold;
    height: 28px;
    width: 32px;
  }

  .ej2-pptx-presenter__icon-btn:hover,
  .ej2-pptx-presenter__square-btn:hover,
  .ej2-pptx-presenter__nav-btn:hover {
    background: $pptx-presenter-hover;
  }

  .ej2-pptx-presenter__divider {
    align-self: center;
    background: $pptx-presenter-border;
    height: 32px;
    width: 1px;
  }

  .ej2-pptx-presenter__end-btn {
    align-items: center;
    background: $pptx-accent;
    border: 0;
    border-radius: 4px;
    color: $pptx-on-accent;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: $pptx-font-weight-semibold;
    gap: 8px;
    height: 46px;
    padding: 0 18px;
  }

  .ej2-pptx-presenter__end-btn:hover {
    filter: brightness(1.1);
  }

  .ej2-pptx-presenter__body {
    box-sizing: border-box;
    display: flex;
    flex: 1;
    gap: 24px;
    min-height: 0;
    overflow: auto;
    padding: 24px;
  }

  .ej2-pptx-presenter__main {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
  }

  .ej2-pptx-presenter__row {
    align-items: center;
    display: flex;
    justify-content: space-between;
  }

  .ej2-pptx-presenter__counter {
    color: $pptx-presenter-fg;
    font-size: 13px;
  }

  .ej2-pptx-presenter__current,
  .ej2-pptx-presenter__next {
    aspect-ratio: 16 / 9;
    background: $pptx-slideshow-slide-bg;
    box-sizing: border-box;
    position: relative;
    width: 100%;
  }

  .ej2-pptx-presenter__notes-panel {
    background: $pptx-presenter-panel-bg;
    border-radius: 8px;
    box-sizing: border-box;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    min-height: 260px;
    padding: 20px;
  }

  .ej2-pptx-presenter__notes-tools {
    display: inline-flex;
    gap: 8px;
  }

  .ej2-pptx-presenter__notes {
    color: $pptx-presenter-fg;
    flex: 1;
    font-size: 20px;
    line-height: 1.4;
    overflow: auto;
    white-space: pre-wrap;
  }

  .ej2-pptx-presenter__notes--empty {
    color: $pptx-slideshow-fg-subtle;
    font-style: italic;
  }

  .ej2-pptx-presenter__side {
    display: flex;
    flex: 0 1 530px;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    width: 530px;
  }

  .ej2-pptx-presenter__next--end::after {
    align-items: center;
    background: $pptx-presenter-panel-bg;
    color: $pptx-presenter-fg-muted;
    content: attr(data-end-label);
    display: flex;
    font-size: $pptx-font-size-sm;
    inset: 0;
    justify-content: center;
    position: absolute;
  }

  .ej2-pptx-presenter__nav {
    display: flex;
    gap: 12px;
  }

  .ej2-pptx-presenter__nav-btn {
    border-radius: 4px;
    flex: 1;
    font-weight: $pptx-font-weight-semibold;
    height: 44px;
  }

  @media (max-width: 1100px) {
    .ej2-pptx-presenter__side {
      flex-basis: 360px;
      width: 360px;
    }
  }

  @media (max-width: 767.98px) {
    .ej2-pptx-presenter__body {
      flex-direction: column;
    }

    .ej2-pptx-presenter__side {
      flex-basis: auto;
      width: auto;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .ej2-pptx-slideshow__controls,
    .ej2-pptx-slideshow__toast {
      transition: none;
    }
  }

  @media (forced-colors: active) {
    .ej2-pptx-slideshow__btn,
    .ej2-pptx-presenter__icon-btn,
    .ej2-pptx-presenter__square-btn,
    .ej2-pptx-presenter__nav-btn,
    .ej2-pptx-presenter__end-btn {
      border: 1px solid ButtonText;
      color: ButtonText;
    }
  }

  // Print window (Print module): one slide per page; page size is set inline.
  .ej2-pptx-print-page {
    position: relative;
    overflow: hidden;
    page-break-after: always;
    break-after: page;

    &:last-child {
      page-break-after: auto;
      break-after: auto;
    }

    > [data-slide-surface] {
      position: relative;
      transform: none;
    }
  }

  .ej2-pptx-gradient-panel {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: $pptx-spacing-sm;
    min-width: 0;
    width: 100%;
    max-width: 24rem;
    padding: $pptx-spacing-lg;
    color: $pptx-on-surface;
    background: $pptx-surface-bg;
    border: 1px solid $pptx-outline;
    border-radius: $pptx-radius-sm;
    font: #{$pptx-font-size-base}/1.5 #{$pptx-font-family};
  }

  .ej2-pptx-gradient-panel > * {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .ej2-pptx-gradient-panel label {
    font-weight: $pptx-font-weight-medium;
  }

  .ej2-pptx-gradient-panel p {
    margin: 0;
    overflow-wrap: anywhere;
  }

  .ej2-pptx-gradient-panel button {
    min-height: $pptx-size-button-height;
    white-space: normal;
  }

  .ej2-pptx-gradient-panel :focus-visible {
    outline: 2px solid $pptx-primary-color;
    outline-offset: 2px;
  }

  .ej2-pptx-gradient-panel [role = 'alert'] {
    color: $pptx-error-color;
  }

  .ej2-pptx-gradient-panel[aria-busy = 'true'] {
    cursor: progress;
  }

  @media (forced-colors: active) {
    .ej2-pptx-gradient-panel {
      color: CanvasText;
      background: Canvas;
      border-color: CanvasText;
    }

    .ej2-pptx-gradient-panel :focus-visible {
      outline-color: Highlight;
    }

    .ej2-pptx-gradient-panel [role = 'alert'] {
      color: CanvasText;
    }
  }

  .ej2-pptx-gradient-stop-bar {
    padding: 8px 16px;
  }

  .ej2-pptx-gradient-stop-track {
    position: relative;
    height: 48px;
    margin: 8px 0;
    border: 1px solid currentColor;
  }

  .ej2-pptx-gradient-panel .ej2-pptx-gradient-stop-handle {
    position: absolute;
    top: 4px;
    transform: translateX(-50%);
    width: 32px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border: 2px solid currentColor;
    border-radius: 4px;
    background: $pptx-surface-bg;
    color: $pptx-text-primary;
    touch-action: none;
  }

  .ej2-pptx-gradient-stop-handle[aria-disabled = 'true'] {
    cursor: default;
  }

  @media (forced-colors: active) {
    .ej2-pptx-gradient-panel .ej2-pptx-gradient-stop-handle {
      background: Canvas;
      color: CanvasText;
      border-color: ButtonText;
    }
  }

  .ej2-pptx-gradient-geometry-panel {
    max-height: calc(100vh - 16px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .ej2-pptx-gradient-background-scope {
    max-height: calc(100vh - 16px);
    overflow-y: auto;
  }

  .ej2-pptx-gradient-background-scope .ej2-pptx-gradient-scope-field {
    display: grid;
    gap: $pptx-spacing-xs;
    min-width: 0;
  }

  .ej2-pptx-gradient-background-scope .ej2-pptx-gradient-scope-field[hidden] {
    display: none;
  }

  // =============================================================================
  // RTL (enableRtl) - Viewer shell only
  // =============================================================================
  // The host receives `.e-rtl`. Only shell chrome is mirrored; slide content
  // (main slide, thumbnail surfaces, slideshow slide) is pinned to LTR so it
  // renders exactly as in LTR mode.

  .ej2-pptx-editor.e-rtl {
    .ej2-pptx-container,
    .ej2-pptx-status-bar,
    .ej2-pptx-notes-pane,
    .ej2-pptx-presenter {
      direction: rtl;
    }

    // Slide content must not be mirrored in this phase. The viewport itself
    // stays RTL so its (vertical) scrollbar sits on the left; the wrapper
    // inside it is pinned LTR so the slide lays out exactly as in LTR mode.
    .ej2-pptx-main-slide__center,
    .ej2-pptx-main-slide__content,
    .ej2-pptx-thumbnail-panel__frame,
    .ej2-pptx-thumbnail-panel__content,
    .ej2-pptx-thumbnail-panel__surface,
    .ej2-pptx-slideshow__slide,
    .ej2-pptx-presenter__current,
    .ej2-pptx-presenter__next .ej2-pptx-thumbnail-panel__surface {
      direction: ltr;
    }

    // Notes pane: only the shell (pane, header, title) mirrors. Notes content
    // does not support RTL in this phase: the body, every paragraph and the
    // presenter notes are forced to LTR (author CSS overrides the paragraphs'
    // `dir="auto"` detection) and start-aligned text resolves to the left.
    .ej2-pptx-notes-pane__body,
    .ej2-pptx-notes-pane__body *,
    .ej2-pptx-presenter__notes,
    .ej2-pptx-presenter__notes * {
      direction: ltr;
      unicode-bidi: normal;
    }

    .ej2-pptx-notes-pane__body,
    .ej2-pptx-presenter__notes {
      text-align: left;
    }

    // Thumbnail pane sits on the right.
    .ej2-pptx-slide-panel {
      border-right: none;
      border-left: 1px solid $pptx-border-color;

      &.ej2-pptx-slide-panel--collapsed {
        border-left: none;
      }
    }

    .ej2-pptx-thumbnail-panel {
      border-right: none;
      border-left: 1px solid $pptx-border-color;
    }

    .ej2-pptx-thumbnail-panel__number {
      text-align: right;
    }

    .ej2-pptx-thumbnail-panel__resize {
      right: auto;
      left: 0;
    }

    // Status bar.
    .ej2-pptx-status-bar__right {
      margin-left: 0;
      margin-right: auto;
    }

    .ej2-pptx-status-bar__zoom-label {
      text-align: left;
    }

    .ej2-pptx-status-bar__slider-thumb {
      margin-left: 0;
      margin-right: -7px;
    }

    .ej2-pptx-status-bar__slider-fill {
      left: auto;
      right: 0;
    }

    .ej2-pptx-status-bar__slide-nav,
    .ej2-pptx-slideshow__btn[data-action = 'prev'],
    .ej2-pptx-slideshow__btn[data-action = 'next'],
    .ej2-pptx-presenter__nav-btn {
      unicode-bidi: plaintext;
    }

    // Presenter view text alignment.
    .ej2-pptx-presenter__label--end,
    .ej2-pptx-presenter__timer {
      text-align: left;
    }

    // Ribbon.
    .ej2-pptx-ribbon.e-ribbon {
      direction: rtl;

      .e-tab-header {
        margin-left: auto;
        margin-right: 0;
      }

      #pptx-ribbon-font-read-only::after {
        margin-left: 0;
        margin-right: 6px;
      }

      .e-ribbon-file-menu .e-caret {
        margin-left: 0;
        margin-right: 6px;
      }

      .ej2-pptx-ribbon-group-lock {
        margin-right: 0;
        margin-left: 4px;
      }
    }

    .e-split-btn-wrapper.ej2-pptx-ribbon-present-btn {
      .e-btn:first-child {
        border-right-width: 1px;
        border-left-width: 0;
        border-top-right-radius: inherit;
        border-bottom-right-radius: inherit;
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
      }

      .e-btn:last-child {
        border-left-width: 1px;
        border-right-width: 0;
        border-top-left-radius: inherit;
        border-bottom-left-radius: inherit;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
      }
    }

    .ej2-pptx-help-dialog__table td {
      text-align: right;
    }
  }

  .ej2-pptx-slideshow.e-rtl .ej2-pptx-slideshow__slide,
  .ej2-pptx-presenter.e-rtl .ej2-pptx-presenter__current,
  .ej2-pptx-presenter.e-rtl .ej2-pptx-thumbnail-panel__surface {
    direction: ltr;
  }

  .ej2-pptx-presenter.e-rtl {
    .ej2-pptx-presenter__label--end,
    .ej2-pptx-presenter__timer {
      text-align: left;
    }
  }
}
