/* ── Prevent content shift: reserve scrollbar space always ─────── */
html {
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

/* ── Off Canvas Panel ───────────────────────────────────────────── */

.oce-panel {
  --oce-panel-width: 320px;
  --oce-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  position: fixed !important;
  top: 0 !important;
  height: 100dvh !important;
  width: var(--oce-panel-width) !important;
  max-width: 90vw !important;
  z-index: 99999 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background: #fff;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.18);
  transition: transform var(--oce-transition), visibility var(--oce-transition) !important;
  will-change: transform;
  visibility: hidden;
}

.oce-panel[data-oce-position="left"] {
  left: 0 !important;
  right: auto !important;
  transform: translateX(-100%) !important;
}

.oce-panel[data-oce-position="right"] {
  right: 0 !important;
  left: auto !important;
  transform: translateX(100%) !important;
}

.oce-panel.is-open {
  transform: translateX(0) !important;
  visibility: visible;
}

/* ── Overlay ────────────────────────────────────────────────────── */

.oce-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.oce-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* ── Close button wrapper (full-width row, alignment here) ──────── */

.oce-close-btn-wrap {
  display: flex;
  width: 100%;
  padding: 12px 16px 0 16px;
  box-sizing: border-box;
}

/* ── Close button itself (auto width, not full width) ───────────── */

.oce-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  padding: 8px 12px;
  background: transparent;
  border: 0 solid transparent;
  cursor: pointer;
  color: inherit;
  font-size: 22px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}

.oce-close-btn:hover {
  opacity: 1;
}

.oce-close-btn i,
.oce-close-btn svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex-shrink: 0;
}

/* ── Toggle button (from widget) ─────────────────────────────────── */

.oce-button-wrapper {
  display: flex;
}

.oce-toggle-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: inherit;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  line-height: 1.2;
  text-decoration: none;
}

.oce-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* Icon wrapper span — flex item so margin gap works reliably */
.oce-toggle-btn .oce-btn__icon {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.oce-toggle-btn .oce-btn__icon i,
.oce-toggle-btn .oce-btn__icon svg {
  font-size: 16px;
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.oce-toggle-btn .oce-btn__label {
  display: inline-block;
}

/* ── Device visibility ──────────────────────────────────────────── */

.oce-disabled .oce-panel {
  position: static !important;
  transform: none !important;
  visibility: visible !important;
  height: auto !important;
  width: auto !important;
  max-width: none !important;
  box-shadow: none !important;
}

/* ── Prevent body scroll when panel is open ─────────────────────── */
body.oce-no-scroll {
  overflow: hidden;
}

/* ── Elementor editor: keep panel visible so you can edit it ────── */
.elementor-editor-active .oce-panel {
  position: relative !important;
  transform: none !important;
  visibility: visible !important;
  height: auto !important;
  width: 100% !important;
  max-width: none !important;
  box-shadow: none !important;
}

.elementor-editor-active .oce-toggle-btn {
  pointer-events: none;
}

.elementor-editor-active .oce-overlay,
.elementor-editor-active .oce-close-btn-wrap {
  display: none !important;
}
