/*
 * CoPlanner — Contextual tab-help overlay.
 *
 * Fancy modal styling for the first-time-use / on-demand tab help system
 * (see help_overlay_controller.js, HelpTopicsHelper, and
 * app/views/shared/help_topics/). Auto-discovered by stylesheet_link_tag
 * :app — no manual <link> wiring needed.
 */

/* ── Contextual (?) trigger button ──────────────────────────────────────── */
.cp-help-trigger {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 6px; /* visually align with the tab underline baseline */
  margin-left: 0.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(24, 144, 255, 0.08);
  color: var(--cp-active-color, #1890ff);
  font-size: 1.1rem;
  line-height: 1;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.cp-help-trigger:hover {
  background: rgba(24, 144, 255, 0.16);
  transform: scale(1.08);
  color: var(--cp-active-color, #1890ff);
}

.cp-help-trigger:focus-visible {
  outline: 2px solid var(--cp-active-color, #1890ff);
  outline-offset: 2px;
}

/* ── Modal shell ─────────────────────────────────────────────────────────── */
.cp-help-modal .modal-content {
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.25);
}

.cp-help-modal .modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-bottom: none;
  padding: 1.5rem;
}

.cp-help-modal .modal-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 0.85;
}

.cp-help-modal .modal-header .btn-close:hover {
  opacity: 1;
}

.cp-help-modal .cp-help-modal-icon {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.cp-help-modal .modal-title {
  font-weight: 600;
}

.cp-help-modal .modal-body {
  padding: 1.75rem;
  max-height: 65vh;
  overflow-y: auto;
}

/* Entrance animation — slightly punchier than Bootstrap's default fade+scale */
.cp-help-modal .modal-dialog {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

/* ── Mobile: keep the trigger button from being squeezed off-screen ────── */
@media (max-width: 768px) {
  .cp-help-trigger {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }
}
