/* Help guide slide-over — width overridden by rai-panel.css when RAI is present */
#access.main-menu-buttons > li {
  width: 16.666%;
}

/* Match <a> icon buttons in the main-menu row */
#access.main-menu-buttons #open-help-guide {
  appearance: none;
  display: block;
  width: 100%;
  height: 54px;
  padding: 4px 0;
  margin: 0;
  border: 0;
  background: transparent;
  line-height: 54px;
  color: #BCBCBC;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#access.main-menu-buttons #open-help-guide:hover {
  color: #868686;
}

/*
 * Entypo defaults use font-size:2em + negative margins + line-height:.42,
 * which collapses the glyph in this row. Reset to rbc-icon metrics.
 */
#access.main-menu-buttons #open-help-guide .icon-question {
  display: inline-block;
  width: 21px;
  height: 30px;
  line-height: 30px;
  vertical-align: middle;
  font-size: 21px;
}

#access.main-menu-buttons #open-help-guide .icon-question:before {
  font-family: EntypoRegular !important;
  font-size: 28px !important;
  line-height: 30px !important;
  margin: 0 !important;
  top: 0 !important;
  position: relative;
  display: inline-block;
  width: 21px;
  text-align: center;
}

.help-guide-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(920px, 96vw);
  z-index: 10050;
  display: flex;
  flex-direction: column;
  background: #fffcf7;
  border-left: 1px solid #ddd4c8;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.18);
  transform: translateX(105%);
  transition: transform 0.25s ease;
}

.help-guide-panel.is-open {
  transform: translateX(0);
}

.help-guide-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #ddd4c8;
  background: rgba(255, 252, 247, 0.96);
}

.help-guide-panel-header .title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #1c1917;
}

.help-guide-panel-header .actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.help-guide-panel-header a,
.help-guide-panel-header button {
  appearance: none;
  border: 1px solid #ddd4c8;
  background: #fff;
  color: #1c1917;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}

.help-guide-panel-header a:hover,
.help-guide-panel-header button:hover {
  background: #f4efe8;
}

.help-guide-panel iframe {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 100%;
  border: 0;
  background: #f7f5f1;
}

.help-guide-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10040;
  background: rgba(28, 25, 23, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.help-guide-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* In-context panel help (standard): ? icon toggles tip */
.mp-actions .mp-panel-help {
  display: inline-block;
  cursor: pointer;
  color: #9a9590;
  vertical-align: middle;
  margin-right: 2px;
}

.mp-actions .mp-panel-help:hover,
.mp-actions .mp-panel-help.is-active {
  color: #0f5b78;
}

/*
 * Tip must be a sibling of .mp-header inside .mp-table (not a child of
 * .mp-header). .mp-header is display:table-row; a tip nested there becomes
 * a squeezed second table-cell.
 */
.mp-context-help {
  display: none;
}

.mp-context-help.is-open {
  display: table-row;
}

.mp-context-help-inner {
  display: table-cell;
  padding: 0 8px 8px;
  color: #3f3a36;
  font-size: 12px;
  line-height: 1.4;
}

.mp-context-help-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  padding: 8px 10px;
  border: 1px solid #ddd4c8;
  border-radius: 6px;
  background: #fffcf7;
}

.mp-context-help-text {
  width: 100%;
}

.mp-context-help-text strong {
  color: #1c1917;
}

.mp-context-help-more {
  appearance: none;
  border: 1px solid #ddd4c8;
  background: #fff;
  color: #0f5b78;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
}

.mp-context-help-more:hover {
  background: #f4efe8;
}

/* Workspace Menu (expanded closed-panels list) */
.mp-closed-list li.hide-filters .mp-panel-help {
  margin-left: 6px;
  vertical-align: middle;
}

.mp-closed-list li.mp-workspace-menu-help {
  list-style: none;
  padding: 0;
  margin: 0;
  cursor: default;
  background: transparent;
  text-transform: none;
}

.mp-closed-list li.mp-workspace-menu-help:hover {
  background: transparent;
}

/* Tip CSS defaults to table-row for panel headers; menu tip is a normal block. */
.mp-closed-list .mp-context-help.is-open {
  display: block;
}

.mp-closed-list .mp-context-help-inner {
  display: block;
  padding: 0 8px 8px;
}

.vertical-filters .mp-closed-list li.mp-workspace-menu-help {
  display: none;
}
