/* Event Management - location content (Seller Guide, Waivers, Event Instructions) */

.event-admin-content-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ecm-root {
  width: 100%;
  min-width: 0;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  font-family: var(--cum-font, var(--font-overpass, 'Overpass', sans-serif));
}

/* Inside event-admin shell: fill viewport and let inner columns scroll */
.event-admin-content-shell > .ecm-root {
  min-height: 200px;
}

.ecm-loading {
  padding: 24px;
  color: var(--cum-muted-foreground, #808c91);
}

.ecm-split {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  border-top: 1px solid var(--cum-border, #e6e8e9);
}

.ecm-nav {
  flex: 0 0 248px;
  width: 248px;
  max-width: 100%;
  min-height: 0;
  border-right: 1px solid var(--cum-border, #e6e8e9);
  background: var(--cum-secondary, #f6f5f8);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ecm-nav-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--cum-space-block, 16px) 0 var(--cum-space-2, 8px);
}

.ecm-nav-scroll .lws-nav-label {
  padding: 0 20px 10px 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cum-muted-foreground, #808c91);
}

.ecm-nav-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--cum-space-2, 8px) 0 var(--cum-space-block, 16px);
  border-top: 1px solid var(--cum-border, #e6e8e9);
  background: var(--cum-secondary, #f6f5f8);
}

.ecm-nav-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 12px;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--cum-primary, #7d5b81);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  width: calc(100% - 24px);
  box-sizing: border-box;
}

.ecm-nav-footer-link:hover:not(:disabled) {
  background: rgba(125, 91, 129, 0.1);
  text-decoration: none;
}

.ecm-nav-footer-link:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ecm-nav-footer-link--active {
  background: var(--cum-primary-soft, rgba(125, 91, 129, 0.12));
  text-decoration: none;
}

.ecm-nav-footer-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  color: var(--cum-primary, #7d5b81);
}

.ecm-nav-footer-link .ecm-trash-count {
  margin-left: auto;
}

.ecm-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ecm-nav-item-wrap {
  margin: 2px 12px;
}

.ecm-nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  padding: 4px 6px 4px 4px;
  position: relative;
  border: 1px solid transparent;
}

.ecm-nav-item:hover {
  background: rgba(125, 91, 129, 0.12);
}

.ecm-nav-item--active {
  background: rgba(125, 91, 129, 0.18);
  border-color: rgba(125, 91, 129, 0.25);
}

.ecm-nav-item.ecm-dragging {
  opacity: 0.55;
}

.ecm-drag-handle {
  cursor: grab;
  color: var(--cum-muted-foreground, #808c91);
  font-size: 12px;
  line-height: 1;
  user-select: none;
  padding: 4px 2px;
  flex-shrink: 0;
  min-width: var(--ecm-drag-handle-slot, 22px);
  text-align: center;
  box-sizing: border-box;
}

.ecm-drag-handle--inert {
  visibility: hidden;
  pointer-events: none;
}

.ecm-nav-item-main {
  flex: 1;
  min-width: 0;
  text-align: left;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: var(--cum-foreground, #021922);
  cursor: pointer;
  padding: 6px 4px;
  font-family: inherit;
}

.ecm-nav-hover-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.ecm-nav-item:hover .ecm-nav-hover-actions {
  opacity: 1;
}

.ecm-icon-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1;
}

.ecm-icon-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.06);
}

.ecm-icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ecm-icon-btn--danger:hover:not(:disabled) {
  background: var(--rz-danger-lighter);
}

.ecm-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  background: #fff;
}

.ecm-main-inner {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  padding: 20px 28px 28px 28px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Full main-column editor for add/edit content block */
.ecm-content-editor {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

.ecm-content-editor-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 22px 28px 16px;
  border-bottom: 1px solid var(--cum-border, #e6e8e9);
  background: #fff;
}

.ecm-content-editor-header-text {
  flex: 1 1 auto;
  min-width: 0;
}

.ecm-content-editor-header-text .ecm-last-saved {
  margin: 6px 0 0 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--cum-muted-foreground, #808c91);
}

.ecm-editor-history-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ecm-history-label {
  font-size: 13px;
  margin: 0;
}

.ecm-history-version-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}

.ecm-history-dd-wrap {
  min-width: 0;
  flex: 0 1 auto;
  max-width: 100%;
}

.ecm-history-dd-wrap .ecm-history-dd,
.ecm-history-dd-wrap .ecm-history-dd.rz-dropdown {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.ecm-history-dd-wrap .ecm-history-dd.rz-dropdown {
  min-height: 52px;
}

.ecm-history-step-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--cum-muted-foreground, #808c91);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.ecm-history-step-btn:hover:not(:disabled) {
  background: rgba(125, 91, 129, 0.12);
  color: var(--cum-primary, #7d5b81);
}

.ecm-history-step-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ecm-history-step-btn .rzi {
  font-size: 18px;
  line-height: 1;
}

.ecm-history-dd-wrap .ecm-history-dd.rz-dropdown .rz-dropdown-label.rz-inputtext,
.ecm-history-dd-wrap .ecm-history-dd.rz-dropdown > span.rz-dropdown-label.rz-inputtext {
  align-items: flex-start !important;
  /* !important on padding here so the global vertical-centering rule in
     site.css (which zeros label padding to keep selected text optically
     centered) doesn't strip the intentional 8px breathing room this
     two-line history trigger needs. */
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  padding-right: 36px;
  overflow: hidden;
}

.ecm-history-dd-wrap .ecm-history-dd.rz-dropdown .rz-dropdown-trigger {
  width: 34px;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ecm-history-dd-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  line-height: 1.2;
}

.ecm-history-dd-line1,
.ecm-history-dd-line2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ecm-history-dd-line1 {
  font-size: 13px;
  color: var(--cum-foreground, #021922);
}

.ecm-history-dd-line2 {
  font-size: 12px;
  color: var(--cum-muted-foreground, #808c91);
}

.ecm-history-readonly-value {
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid var(--cum-border, #e6e8e9);
  border-radius: 8px;
  background: var(--cum-card, #fff);
  color: var(--cum-foreground, #021922);
  line-height: 1.45;
  white-space: pre-wrap;
}

.ecm-archived-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff3cd;
  color: #856404;
  font-size: 12px;
  font-weight: 700;
}

.ecm-main-trash {
  padding-right: 8px;
}

.ecm-trash-list--main {
  margin-bottom: 20px;
}

.ecm-block-meta {
  margin: 0;
  padding: 0 0 2px 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--cum-muted-foreground, #808c91);
}

.ecm-history-empty-hint {
  margin-left: var(--cum-space-2, 8px);
  font-size: 12px;
  white-space: nowrap;
}

.ecm-trash-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--cum-primary-soft, rgba(125, 91, 129, 0.16));
  color: var(--cum-primary, #7d5b81);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

.ecm-trash-hint {
  margin: 8px 0 0 0;
  font-size: 13px;
}

.ecm-trash-subhd {
  margin: 12px 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cum-muted-foreground, #808c91);
}

.ecm-main-trash .ecm-block-list > .ecm-trash-subhd:first-child {
  margin-top: 0;
}

.ecm-trash-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ecm-trash-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.ecm-trash-row-main {
  flex: 1 1 auto;
  min-width: 0;
}

.ecm-trash-title {
  display: block;
  font-weight: 600;
}

.ecm-trash-meta {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

.ecm-section-pick-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ecm-section-pick-item .rz-button {
  width: 100%;
  justify-content: flex-start;
}

.ecm-content-editor-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.ecm-content-editor-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px 28px 28px 28px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.ecm-muted {
  color: var(--cum-muted-foreground, #808c91);
  font-size: 15px;
}

.ecm-blocks-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.ecm-blocks-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.ecm-blocks-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 14px;
}

.ecm-link-btn {
  border: none;
  background: transparent;
  color: var(--cum-primary, #7d5b81);
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  font-family: inherit;
}

.ecm-link-btn:hover {
  text-decoration: underline;
}

.ecm-toolbar-sep {
  color: var(--cum-border, #e6e8e9);
}

.ecm-empty-blocks {
  margin: 12px 0 20px 0;
  color: var(--cum-muted-foreground, #808c91);
  font-size: 15px;
}

.ecm-block-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.ecm-block {
  --ecm-block-head-pad-x: 12px;
  --ecm-drag-handle-slot: 22px;
  --ecm-block-title-offset: calc(var(--ecm-block-head-pad-x) + var(--ecm-drag-handle-slot) + 8px);
  border: 1px solid var(--cum-border, #e6e8e9);
  border-radius: 10px;
  background: var(--cum-card, #fff);
}

.ecm-block.ecm-dragging {
  opacity: 0.55;
}

.ecm-block-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 14px var(--ecm-block-head-pad-x, 12px) 8px;
}

.ecm-block-head-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}

.ecm-block-title-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  padding: 4px 0;
}

.ecm-block-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--cum-foreground, #021922);
}

.ecm-block-type-pill {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5c3d6e;
  background: rgba(125, 91, 129, 0.15);
  padding: 2px 8px;
  border-radius: 999px;
}

.ecm-block-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  padding-top: 2px;
}

.ecm-block-body {
  padding-top: 14px;
  padding-bottom: 14px;
  padding-right: var(--ecm-block-head-pad-x, 12px);
  padding-left: var(--ecm-block-title-offset, 44px);
  border-top: 1px solid var(--cum-muted, #f2ebf3);
}

.ecm-html-preview {
  font-size: 15px;
  line-height: 1.5;
  color: var(--cum-foreground, #021922);
}

.ecm-img-full {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  border-radius: 8px;
  background: #f6f6f6;
}

.ecm-video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}

.ecm-video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.ecm-add-block-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--cum-border, #e6e8e9);
}

.ecm-add-block-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--cum-secondary-foreground, #35474e);
}

.ecm-panel {
  flex: 0 0 380px;
  width: 380px;
  max-width: 100%;
  min-height: 0;
  border-left: 1px solid var(--cum-border, #e6e8e9);
  background: #fafafa;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ecm-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--cum-border, #e6e8e9);
  background: #fff;
}

.ecm-panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.ecm-panel-close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--cum-muted-foreground, #808c91);
  padding: 4px 8px;
}

.ecm-panel-body {
  padding: 16px 18px 24px 18px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.ecm-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

/* Pinned footer: Save/Cancel stay visible while the form body scrolls */
.ecm-content-editor > .ecm-panel-actions,
.ecm-panel > .ecm-panel-actions {
  margin-top: 0;
  padding: 12px 28px 16px 28px;
  border-top: 1px solid var(--cum-border, #e6e8e9);
  background: #fff;
  flex-shrink: 0;
  justify-content: flex-start;
}

.ecm-panel > .ecm-panel-actions {
  padding-left: 18px;
  padding-right: 18px;
}

.ecm-html-editor {
  min-height: 220px;
}

.ecm-html-editor--full {
  min-height: min(420px, 50vh);
}

.ecm-upload-preview {
  margin-top: 12px;
}

.ecm-waiver-ack-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ecm-waiver-ack-label {
  margin: 0;
  font-weight: 500;
}

.ecm-waiver-ack-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--cum-border, #e6e8e9);
  border-radius: 8px;
  background: #fafafa;
  font-size: 14px;
}

/* ─────────────────────────────────────────────────────────────────────
   Inline error chip - used inside the section / content panels and the
   blocks-list area. Replaces RadzenAlert AlertStyle.Danger which renders
   too heavy for these tight UI surfaces. Border-radius matches the 8px
   used by the sitewide RadzenButton override in site.css.
   ───────────────────────────────────────────────────────────────────── */
.ecm-inline-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  background: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.28);
  color: #b02a37;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.4;
}

.ecm-inline-error-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: currentColor;
}

.ecm-inline-error-text {
  flex: 1 1 auto;
}

.ecm-inline-error-close {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  padding: 0 2px;
  margin: -2px -4px -2px 0;
  color: currentColor;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  opacity: 0.7;
}

.ecm-inline-error-close:hover { opacity: 1; }
.ecm-inline-error-close:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 4px;
}

/* =============================================================================
   Mobile drilldown - xs/sm/md tier (max-width 1023.98px mirrors --bp-lg).
   The .ecm-split two-pane layout stacks into a single column; the rail and the
   main pane are mutually exclusive. The .ecm-split--detail modifier is set by
   the consuming component when there is a selection (folder, section, panel,
   trash view) so the main area takes over the viewport. The .ecm-mobile-back
   link is rendered inside .ecm-main and only painted on mobile.
   Media queries can't deref CSS vars - the literal mirrors --bp-lg.
   ============================================================================= */
@media (max-width: 1023.98px) {
  .ecm-split {
    flex-direction: column;
    border-top: none;
  }

  .ecm-nav {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--cum-border, #e6e8e9);
  }

  /* List view: rail visible, main hidden. */
  .ecm-split:not(.ecm-split--detail) .ecm-main {
    display: none;
  }

  /* Detail view: main visible, rail hidden. */
  .ecm-split.ecm-split--detail .ecm-nav {
    display: none;
  }

  .ecm-split.ecm-split--detail .ecm-main {
    flex-direction: column;
  }

  /* Side panel (Add/Edit Section) becomes full-width when it sits next to
     .ecm-main-inner on mobile so the form isn't squeezed into a 380px column.
     On desktop .ecm-panel keeps its 380px right-rail layout. */
  .ecm-panel {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    border-left: none;
    border-top: 1px solid var(--cum-border, #e6e8e9);
  }

  /* Tighter horizontal padding on the editor body so forms breathe at 320px. */
  .ecm-main-inner,
  .ecm-content-editor-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .ecm-content-editor-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .ecm-content-editor > .ecm-panel-actions,
  .ecm-panel > .ecm-panel-actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Hover actions on nav rows are unreachable on touch - make them visible. */
  .ecm-nav-hover-actions {
    opacity: 1;
  }

  /* Touch-friendly drag handles: min 44x44 hit target on mobile per WCAG.
     Visual size stays small (the dots), the padding inflates the tap area. */
  .ecm-drag-handle {
    min-width: 32px;
    padding: 10px 6px;
    font-size: 14px;
  }

  /* Inline icon buttons sized up so taps don't fat-finger neighbours. */
  .ecm-icon-btn {
    padding: 8px 10px;
    min-width: 36px;
    min-height: 36px;
  }
}

/* Mobile back link inside .ecm-main - mirrors .jbf-mobile-back used at the
   page level so the visual rhythm is consistent. Hidden on lg+. */
.ecm-mobile-back {
  display: none;
}

@media (max-width: 1023.98px) {
  .ecm-mobile-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px 8px;
    border: none;
    background: transparent;
    color: var(--cum-primary, #7d5b81);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    flex-shrink: 0;
  }

  .ecm-mobile-back:hover:not(:disabled) {
    text-decoration: underline;
  }

  .ecm-mobile-back svg {
    flex-shrink: 0;
  }
}
