/* ============================================
   EXPLORE + MY WORK — SHARED COMPONENTS
   Used by: explore.html, work.html
   Do not add page-specific styles here.
   ============================================ */

/* Reset outer page-content padding — activity-page handles its own */
.page-content:has(.activity-page) {
  padding: 0 !important;
  max-width: none !important;
}

.page-content > .home-activity-page {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding-left: var(--space-10);
  padding-right: var(--space-10);
  box-sizing: border-box;
}

/* Page shell */
.activity-page {
  max-width: var(--ew-page-max-width);
  margin: 0 auto;
  padding: calc(var(--topbar-height) + var(--ew-page-padding-y)) var(--ew-page-padding-x) var(--ew-page-padding-y-bottom);
}

/* Search bar */
.activity-page .activity-search-bar {
  display: flex;
  align-items: center;
  border: 1px solid var(--gray-light);
  border-radius: var(--ew-search-radius);
  padding: var(--ew-search-padding-y) var(--ew-search-padding-x);
  margin-top: var(--ew-search-offset);
  margin-bottom: var(--space-5);
  gap: var(--space-2);
  transition: border-color 150ms ease;
  background: var(--white);
}
.activity-page .activity-search-bar:focus-within {
  /* Black focus ring (was the pink accent, swapped 4 May 2026 per Christine). */
  border-color: var(--navy);
}
.activity-page .activity-search-icon {
  color: var(--gray-mid);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.activity-page .activity-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-family);
  font-size: var(--text-base);
  color: var(--navy);
  background: none;
}
.activity-page .activity-search-input::placeholder {
  color: var(--gray-mid);
}
.activity-page .activity-search-btn {
  padding: 0 var(--space-6);
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: var(--ew-search-radius);
  font-family: var(--font-family);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  align-self: stretch;
  margin: calc(-1 * var(--ew-search-padding-y) - 1px) calc(-1 * var(--ew-search-padding-x) - 1px) calc(-1 * var(--ew-search-padding-y) - 1px) 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity 150ms ease;
}
.activity-page .activity-search-btn:hover { opacity: 0.9; }

/* Search filter dropdown */
.search-filter-dropdown {
  position: relative;
  flex-shrink: 0;
}
.search-filter-btn {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--navy);
  white-space: nowrap;
  transition: background 150ms ease;
}
.search-filter-btn:hover { background: var(--gray-background); }
.search-filter-btn svg { color: var(--gray-mid); flex-shrink: 0; }
.search-filter-dropdown.open .search-filter-btn svg { transform: rotate(180deg); }
.search-filter-label { font-weight: var(--font-weight-medium); }
.search-filter-menu {
  display: none;
  position: absolute;
  top: calc(100% + var(--space-1));
  left: 0;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  z-index: 100;
  overflow: hidden;
}
.search-filter-dropdown.open .search-filter-menu,
.search-filter-dropdown:hover .search-filter-menu { display: block; }
.search-filter-option {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  transition: background 100ms ease;
}
.search-filter-option:hover { background: var(--gray-background); }
.search-filter-option.active { font-weight: var(--font-weight-semibold); color: var(--pink); }
.search-filter-option:hover .project-filter-edit-btn { opacity: 1; }

/* Stats bar */
.activity-page .activity-stats-bar {
  gap: 0;
  padding: var(--space-3) 0;
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  align-items: center;
}
.activity-page .activity-results-count {
  font-size: var(--text-sm);
  color: var(--ink-2);
}
.activity-page .activity-results-count strong {
  color: var(--navy);
  font-weight: var(--font-weight-bold);
}

/* Two-column layout */
.activity-page .activity-columns {
  display: grid;
  grid-template-columns: var(--ew-list-col) var(--ew-preview-col);
  gap: var(--ew-col-gap);
  align-items: start;
}

/* Time groups */
.activity-page .activity-time-group {
  font-size: var(--ew-item-meta-size);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-mid);
  padding: var(--space-5) 0 var(--space-2);
}

/* List */
.activity-page .activity-list { gap: 0; display: flex; flex-direction: column; }

/* List items — card style (matches home popular list: 5 × 100px = 500px) */
.activity-page .activity-item {
  padding: var(--space-4-5) var(--space-6);
  height: 100px;
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color 150ms ease;
  border-radius: 0;
  border: 0.75px solid var(--gray-light);
  border-top: none;
  background: var(--white);
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: var(--ew-item-gap);
}
.activity-page .activity-list > .activity-item:first-child,
.activity-page .activity-list > .report-parent:first-child .activity-item {
  border-top: 0.75px solid var(--gray-light);
}
.activity-page .activity-item:hover {
  border-color: var(--gray-mid);
}
.activity-page .activity-item.hover-active,
.activity-page .activity-item.hover-active:hover {
  background: var(--white);
  box-shadow: var(--ew-item-shadow-selected);
}
.activity-page .activity-item-content { flex: 1; min-width: 0; }
.activity-page .activity-item-top {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-1-5);
  color: var(--gray-mid);
}
.activity-page .activity-item-meta {
  font-size: var(--ew-item-meta-size);
  color: var(--gray-mid);
}
.activity-page .activity-item-title,
.home-activity-page .activity-item-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: nowrap;
  font-size: var(--ew-item-title-size);
  font-weight: var(--font-weight-medium);
  color: var(--navy);
  text-decoration: none;
  line-height: 1.4;
}
.activity-page .activity-item-title .activity-title-text,
.home-activity-page .activity-item-title .activity-title-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.activity-page .activity-item-subtitle {
  font-size: var(--ew-item-meta-size);
  color: var(--gray-mid);
  font-weight: var(--font-weight-normal);
  margin-top: var(--space-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}
.activity-page .activity-item-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}
.activity-page .activity-item-date {
  font-size: var(--ew-item-meta-size);
  color: var(--gray-mid);
  white-space: nowrap;
}
.activity-page .activity-item-open,
.activity-page .activity-item-edit {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 150ms ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.activity-page .activity-item-open .open-icon,
.activity-page .activity-item-edit .open-icon {
  display: none;
}
.activity-page .activity-item:hover .activity-item-open,
.activity-page .activity-item.selected .activity-item-open,
.activity-page .activity-item:hover .activity-item-edit,
.activity-page .activity-item.selected .activity-item-edit { opacity: 1; }
.activity-page .activity-item-open:hover,
.activity-page .activity-item-edit:hover { color: var(--pink); cursor: pointer; }

.activity-page .activity-item[data-report-type="country-intelligence"],
.home-activity-page .activity-item[data-report-type="country-intelligence"] {
  border-left: 2px solid var(--cyan);
}
.activity-free-badge {
  font-size: var(--text-3xs);
  font-weight: var(--font-weight-semibold);
  color: var(--cyan);
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.activity-item-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
  padding-right: 1px;
  min-width: 44px;
  justify-content: flex-end;
}

.activity-item-menu-wrap {
  position: relative;
}

.activity-item-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  color: var(--gray-mid);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}
.activity-item-menu-btn:hover {
  color: var(--navy);
  background: var(--gray-light);
}

.activity-item-menu-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 160px;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 100;
  overflow: hidden;
}
.activity-item-menu-wrap.open .activity-item-menu-dropdown {
  display: block;
}

.activity-item-menu-option {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  color: var(--navy);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.activity-item-menu-option:hover {
  background: var(--gray-light);
}
.activity-item-menu-option.delete-option {
  color: var(--negative);
}
.activity-item-menu-option.delete-option:hover {
  background: #FFF0F3;
}

.activity-title-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  color: var(--gray-mid);
  opacity: 0;
  transition: opacity 0.15s, color 0.15s;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: var(--space-1);
}
.activity-page .activity-item:hover .activity-title-edit-btn {
  opacity: 1;
}
.activity-title-edit-btn:hover {
  color: var(--navy);
}

/* Progress indicators */
.activity-page .activity-item-progress-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}
.activity-page .activity-session-square {
  width: var(--ew-session-square);
  height: var(--ew-session-square);
  border-radius: var(--ew-session-square-radius);
  background: var(--gray-light);
  flex-shrink: 0;
}
.activity-page .activity-session-square--done { background: var(--pink); }
.activity-page .activity-session-square--current {
  background: transparent;
  border: 2px solid var(--pink);
}
.activity-page .activity-progress-pct {
  font-size: var(--ew-item-meta-size);
  color: var(--gray-mid);
  flex-shrink: 0;
  margin-left: var(--space-1);
}

/* Program group */
.activity-program-group {
  border-radius: var(--ew-item-radius);
  border: var(--ew-item-border);
  overflow: hidden;
  margin-bottom: 0;
  transition: border-color 150ms ease;
}
.activity-program-group:hover { border-color: var(--gray-mid); }
.activity-page .activity-program-group .activity-child-item {
  background: var(--white);
  border-radius: 0;
  border: none;
  border-top: 1px solid var(--gray-light);
}
.activity-page .activity-program-group .activity-child-item.report-child {
  border-top: 1px dotted var(--gray-light);
}
.activity-program-group .activity-child-item .activity-item-title { font-weight: var(--font-weight-normal); }
.activity-page .activity-child-item { background: var(--gray-background); padding-left: 32px; }
.activity-page .report-child { background: var(--white); padding-left: 48px; }
.activity-page .activity-child-item + .activity-item:not(.activity-child-item) { margin-top: var(--space-4); }

/* Preview panel */
.activity-page .activity-preview-panel {
  position: sticky;
  top: calc(var(--topbar-height) + var(--space-8));
  max-height: calc(100vh - var(--topbar-height) - var(--space-8) - var(--space-8));
  overflow-y: auto;
  padding: var(--ew-preview-padding);
  margin: calc(-1 * var(--ew-preview-padding));
  width: calc(100% + calc(2 * var(--ew-preview-padding)));
}
.activity-page .activity-preview-card { display: none; flex-direction: column; gap: var(--space-3); }
.activity-page .activity-preview-card.click-active,
.activity-page .activity-preview-card.hover-active { display: flex; }
.activity-page .activity-preview-section {
  background: var(--white);
  border-radius: var(--ew-preview-section-radius) var(--ew-preview-section-radius) 0 0;
  box-shadow: var(--ew-preview-section-shadow);
  border: none;
  border-top: 0.75px solid var(--gray-light);
  border-bottom: 0.75px solid var(--gray-light);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 500px;
}
.activity-page .activity-preview-hero { padding: var(--ew-preview-card-padding-x); }
.activity-page .activity-preview-tag,
.home-activity-page .activity-preview-tag {
  font-size: var(--ew-preview-tag-size);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
.activity-page .activity-preview-title {
  font-size: var(--ew-preview-title-size);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  color: var(--navy);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
/* The 2-line height reservation that used to live here has moved up
   to the parent `.ep-title-block` wrapper (free.css under
   `.free-page#explorePage`) so the gradient divider can hug the
   actual title text on both 1- and 2-line rows while the wrapper's
   reserved height keeps the meta line / CTA / description below from
   shifting between products. */
.activity-page .activity-preview-meta-strip {
  display: flex;
  gap: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--gray-light);
  font-size: var(--ew-item-meta-size);
  color: var(--gray-mid);
}
.activity-page .activity-preview-meta-strip strong {
  color: var(--navy);
  font-weight: var(--font-weight-semibold);
}
.activity-page .activity-preview-insights {
  padding: var(--ew-preview-card-padding-y) var(--ew-preview-card-padding-x);
}
.activity-page .activity-preview-label {
  font-size: var(--ew-preview-label-size);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-mid);
  margin-bottom: var(--space-3);
}
.activity-page .activity-preview-desc {
  font-size: var(--ew-preview-desc-size);
  line-height: 1.65;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 8;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 13.2em;
}
.activity-preview-divider { height: 1px; background: var(--gray-light); margin: 0 var(--ew-preview-card-padding-x); }
.activity-page .activity-preview-actions {
  padding: var(--space-4) var(--ew-preview-card-padding-x);
  display: flex;
  gap: var(--space-3);
  align-items: center;
}
.activity-preview-card1,
.activity-preview-card2,
.activity-preview-card3,
.activity-preview-card4 { padding: var(--ew-preview-card-padding-y) var(--ew-preview-card-padding-x); }


.activity-preview-desc + .ep-credits,
.ep-snippet-item + .ep-credits,
#ep-snippets + .ep-credits {
  margin-top: var(--space-7-5);
}
.ep-ad {
  display: block;
  margin-top: var(--space-5);
  margin-bottom: var(--space-4);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  line-height: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ep-ad:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.ep-ad img {
  display: block;
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}
/* Legacy .ep-ad-event base + variant rules removed on 2026-04-17.
   Event-ad styling now lives exclusively in static/css/ad/index.css
   (tokens) and static/css/ad/layouts.css (8 brand-color layouts).
   Do not re-add hardcoded palette rules here. */
.ep-ad + .ep-credits {
  margin-top: var(--space-4);
}
.ep-credits {
  height: 65px;
  flex-shrink: 0;
  padding: var(--space-7-5);
  margin-left: calc(-1 * var(--ew-preview-card-padding-x));
  margin-right: calc(-1 * var(--ew-preview-card-padding-x));
  margin-bottom: calc(-1 * var(--ew-preview-card-padding-x));
  color: var(--navy);
  font-size: 13px;
  font-weight: var(--font-weight-normal);
  letter-spacing: 0.01em;
  text-align: left;
  position: relative;
}
.ep-credits::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--ew-preview-card-padding-x);
  right: var(--ew-preview-card-padding-x);
  height: 1px;
  background: var(--gray-light);
}
.ep-credits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
.ep-credit-col {
  text-align: left;
}
.ep-credit-col-value {
  font-weight: var(--font-weight-medium);
  font-size: 13px;
}
.ep-credit-col-label {
  font-size: var(--text-2xs);
  color: var(--gray-mid);
}
.ep-credit-col--featured .ep-credit-col-value {
  color: var(--pink);
  font-weight: var(--font-weight-semibold);
}
.ep-credit-row {
  padding: 3px 0;
}


.work-activity-log-heading {
  font-size: var(--text-2xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-mid);
  margin-bottom: 10px;
}
.work-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: var(--space-1-5) 0;
  font-size: var(--text-sm);
  color: var(--gray-mid);
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
}
.work-activity-item:hover .work-activity-title {
  color: var(--pink);
}
.work-activity-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--gray-mid);
  margin-top: 1px;
}
.work-activity-text {
  flex: 1;
  min-width: 0;
}
.work-activity-title {
  font-weight: var(--font-weight-normal);
  color: var(--gray-mid);
}
.work-activity-time {
  font-size: var(--text-2xs);
  color: var(--gray-mid);
  margin-top: 2px;
}

.kit-tooltip {
  position: fixed;
  z-index: 9999;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  padding: 14px var(--space-4-5);
  min-width: 200px;
  max-width: 300px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.kit-tooltip.active { opacity: 1; }
.kit-tooltip-heading {
  font-size: var(--text-2xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--pink);
  margin-bottom: var(--space-2);
}
.kit-tooltip-step {
  font-size: 13px;
  color: var(--navy);
  padding: 3px 0;
  display: flex;
  gap: var(--space-2);
}
.kit-tooltip-num {
  font-weight: var(--font-weight-semibold);
  color: var(--gray-mid);
  flex-shrink: 0;
}

.ep-snippet-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--text-sm);
  line-height: var(--ew-preview-desc-lh);
  color: var(--ew-preview-desc-color);
  margin: 0 0 var(--space-2) 0;
}
.ep-snippet-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ep-snippet-item:last-child { margin-bottom: 0; }
.ep-snippet-num {
  font-weight: var(--font-weight-semibold);
  color: var(--ew-preview-desc-color);
  flex-shrink: 0;
}

.ep-key-stats-wrap {
  padding: var(--space-7-5);
}
.ep-key-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ep-key-stat {
  border-radius: 10px;
  padding: var(--space-3) 14px;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: var(--space-1-5);
  min-width: 0;
  overflow: hidden;
  container-type: inline-size;
}
.ep-key-stat-label {
  font-size: 13px;
  font-weight: var(--font-weight-normal);
  line-height: 1.4;
  color: var(--ew-preview-desc-color);
  height: calc(13px * 1.4 * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ep-key-stat-value {
  font-size: clamp(14px, 11cqi, 24px);
  font-weight: var(--font-weight-bold);
  line-height: 1.15;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  max-width: 100%;
}
@media (max-width: 520px) {
  .ep-key-stats { grid-template-columns: 1fr; }
}

.explore-chart-tooltip {
  display: none;
  position: fixed;
  z-index: 1000;
  background: rgba(255,255,255,0.96);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  padding: 10px 14px;
  width: 380px;
  pointer-events: none;
}
.explore-chart-bar-row {
  display: flex;
  align-items: center;
  gap: var(--space-1-5);
  margin-bottom: var(--space-1-5);
}
.explore-chart-bar-row:last-child { margin-bottom: 0; }
.explore-chart-bar-label {
  font-size: var(--text-2xs);
  font-weight: var(--font-weight-normal);
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.explore-chart-bar-track {
  flex: 1;
  min-width: 0;
  height: 4px;
  background: transparent;
  border-radius: 3px;
  overflow: hidden;
}
.explore-chart-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}
.explore-chart-bar-pct {
  font-size: var(--text-2xs);
  font-weight: var(--font-weight-normal);
  color: var(--text-primary);
  flex-shrink: 0;
  text-align: right;
  margin-left: auto;
  white-space: nowrap;
}

.activity-preview-section:has(.activity-preview-card5) {
  position: sticky;
  bottom: 0;
  background: var(--white);
  z-index: 10;
}
.activity-preview-card5 {
  padding: var(--space-4) var(--ew-preview-card-padding-x);
  display: flex;
  flex-direction: row;
  gap: var(--space-3);
}


.activity-preview-cta {
  display: block;
  text-align: center;
  padding: 10px var(--space-5);
  background: var(--navy);
  color: var(--white);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-full);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.activity-preview-cta:hover { opacity: 0.9; }
.activity-preview-cta svg { vertical-align: -2px; margin-right: 4px; }
.explore-cta-secondary {
  flex: 1;
}
.explore-cta-personalize {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: var(--space-1-5);
  background: var(--white) !important;
  color: var(--navy) !important;
  border: 1px solid var(--gray-light) !important;
}
.activity-item-meta-price {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-normal);
  color: var(--ink-2);
}
.activity-item-cart-icon {
  color: var(--gray-mid);
  cursor: pointer;
  display: flex;
  align-items: center;
}
.activity-item-cart-icon:hover {
  color: var(--pink);
}
.activity-preview-cta-secondary {
  display: block;
  text-align: center;
  padding: 10px var(--space-5);
  background: transparent;
  color: var(--ink-2);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  border-radius: 6px;
  border: 1px solid var(--gray-light);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.activity-preview-cta-secondary:hover {
  border-color: var(--gray-mid);
  color: var(--navy);
}

.delete-confirm-modal {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 10px;
  padding: var(--space-5) var(--space-6);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  z-index: 9999;
  min-width: 280px;
  max-width: 340px;
}
.delete-confirm-title {
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--navy);
  margin: 0 0 var(--space-1-5);
}
.delete-confirm-sub {
  font-size: var(--text-sm);
  color: var(--gray-mid);
  line-height: 1.5;
  margin: 0 0 var(--space-4);
}
.delete-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.delete-confirm-cancel {
  padding: var(--space-2) var(--space-4);
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  background: transparent;
  border: 1px solid var(--gray-light);
  border-radius: 6px;
  cursor: pointer;
  color: var(--ink-2);
  transition: border-color 0.15s ease;
}
.delete-confirm-cancel:hover { border-color: var(--gray-mid); }
.delete-confirm-ok {
  padding: var(--space-2) var(--space-4);
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  background: #e53e3e;
  color: var(--white);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.delete-confirm-ok:hover { opacity: 0.9; }
.work-share-channels {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: var(--space-2) 0 0;
}
.work-share-ch {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: var(--space-2) var(--space-1-5);
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  color: var(--navy);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}
.work-share-ch:hover { background: var(--gray-white); }
.work-share-ch svg { flex-shrink: 0; }
.move-project-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: var(--space-2) 0;
  max-height: 200px;
  overflow-y: auto;
}
.move-project-item {
  background: none;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  text-align: left;
  font-size: 13px;
  cursor: pointer;
  color: var(--navy);
}
.move-project-item:hover {
  background: var(--gray-light);
}

a.activity-item-menu-option {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  color: var(--navy);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
a.activity-item-menu-option:hover {
  background: var(--gray-light);
}

.share-toast {
  position: fixed;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--navy);
  color: var(--white);
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  padding: 10px var(--space-5);
  border-radius: var(--radius-md);
  opacity: 0;
  transition: opacity 250ms ease, transform 250ms ease;
  z-index: 10000;
  pointer-events: none;
}
.share-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive — laptop screens: reduce text, stack actions vertically */
@media (max-width: 1440px) {
  .activity-page .activity-item-open .open-label,
  .activity-page .activity-item-edit .open-label { display: none; }
  .activity-page .activity-item-open .open-icon,
  .activity-page .activity-item-edit .open-icon { display: flex; }
  .activity-item-actions {
    flex-direction: column-reverse;
    gap: var(--space-1);
    align-items: center;
  }
  .activity-page .activity-item:hover .activity-title-edit-btn { display: none; }
}

/* Responsive — mobile only (iPad 768px+ gets desktop layout) */
@media (max-width: 767px) {
  .activity-page .activity-columns { grid-template-columns: 1fr; }
  .activity-page .activity-preview-panel { display: none; }
  .activity-page { padding: var(--space-6) var(--ew-page-padding-x-mobile) var(--ew-page-padding-y-bottom); }
  .activity-page .activity-item-date { display: none; }
}

.mobile-inline-preview {
  display: none;
  padding: var(--space-4) var(--space-4) var(--space-5);
  background: var(--gray-background);
  border-top: 1px solid var(--gray-light);
  margin-top: -1px;
}

.mobile-inline-preview.open {
  display: block;
}

.mobile-inline-preview .mip-tag {
  font-size: var(--text-3xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.05em;
  color: var(--gray-mid);
  text-transform: uppercase;
  margin-bottom: var(--space-1);
}

.mobile-inline-preview .mip-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--navy);
  margin-bottom: var(--space-2);
}

.mobile-inline-preview .mip-desc {
  font-size: var(--font-size-sm);
  line-height: 1.55;
  color: var(--ink-2);
  margin-bottom: var(--space-3);
}

.mobile-inline-preview .mip-desc-toggle {
  color: var(--pink, var(--navy));
  text-decoration: underline;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  white-space: nowrap;
}

.mobile-inline-preview .mip-label {
  font-size: var(--text-3xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.05em;
  color: var(--gray-mid);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  margin-top: var(--space-3);
}

.mobile-inline-preview .mip-headline {
  font-size: var(--font-size-sm);
  color: var(--ink-2);
  line-height: 1.5;
  padding: var(--space-1) 0;
}

.mobile-inline-preview .mip-headline-num {
  font-weight: var(--font-weight-semibold);
  color: var(--pink);
  margin-right: var(--space-1);
}

.mobile-inline-preview .mip-credits {
  font-size: var(--font-size-sm);
  color: var(--gray-mid);
  margin-bottom: var(--space-2);
}

.mobile-inline-preview .mip-cta-wrap {
  display: flex;
  gap: var(--space-2);
  width: 100%;
  margin-top: var(--space-3);
}

.mobile-inline-preview .mip-cta {
  display: block;
  flex: 1;
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--white);
  background: var(--navy);
  border-radius: var(--radius-md);
  text-decoration: none;
  text-align: center;
}

.mobile-inline-preview .mip-cta + .mip-cta {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--gray-light);
}

@media (min-width: 768px) {
  .mobile-inline-preview { display: none !important; }
  .home-sidebar-card .mobile-inline-preview { display: none; }
  .home-sidebar-card .mobile-inline-preview.open { display: block !important; }
}

.explore-card-menu-wrap {
  position: relative;
}
.explore-card-menu-trigger {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  color: var(--ink-2);
  display: flex;
  align-items: center;
}
.explore-card-menu-trigger:hover {
  color: var(--navy);
}
.explore-card-menu-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 100;
  min-width: 140px;
  padding: var(--space-1) 0;
}
.explore-card-menu-dropdown.open {
  display: block;
}
.explore-card-menu-item {
  display: block;
  padding: var(--space-2) 14px;
  font-size: var(--font-size-sm);
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
}
.explore-card-menu-item:hover {
  background: var(--gray-white);
}

.explore-show-more-row {
  padding: var(--space-3) 0 0;
  text-align: left;
}
.explore-show-more-btn {
  background: none;
  border: none;
  font-size: var(--text-sm);
  color: var(--pink);
  font-weight: var(--font-weight-medium);
  font-family: var(--font-family);
  cursor: pointer;
  padding: 0;
}
.explore-show-more-btn:hover {
  text-decoration: underline;
}
.explore-show-more-count {
  color: var(--gray-mid);
  font-weight: var(--font-weight-regular);
}

.preview-close-btn {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  z-index: 2;
  background: none;
  border: none;
  padding: var(--space-1);
  cursor: pointer;
  color: var(--ink-2);
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
  line-height: 0;
}
.preview-close-btn:hover {
  background: var(--gray-light);
  color: var(--navy);
}

#explorePreviewCards {
  position: relative;
}

.preview-collapsible {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.preview-collapsible .ep-credits,
.preview-collapsible #ep-credits {
  margin-top: auto;
}
.preview-collapsible.has-ad .ep-credits,
.preview-collapsible.has-ad #ep-credits {
  margin-top: auto;
  margin-bottom: var(--space-4);
}
.preview-collapsible.has-ad #ep-ad {
  margin-top: 0;
}
#explorePreviewCards.preview-collapsed .preview-collapsible {
  display: none;
}
#explorePreviewCards.preview-collapsed .preview-close-btn {
  display: none;
}
.preview-expand-btn {
  display: none;
}
#explorePreviewCards.preview-collapsed .preview-expand-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: none;
  border: none;
  padding: 2px 0 0;
  cursor: pointer;
  color: var(--pink);
  font-size: var(--text-xs);
  font-family: var(--font-family);
  font-weight: var(--font-weight-medium);
  line-height: 1;
}
#explorePreviewCards.preview-collapsed .preview-expand-btn:hover {
  text-decoration: underline;
}

.home-sidebar-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.home-sidebar-section-heading .sidebar-toggle-icon {
  transition: transform 0.2s;
  color: var(--ink-2);
  flex-shrink: 0;
}
.home-sidebar-section.open .sidebar-toggle-icon {
  transform: rotate(90deg);
}
.home-sidebar-section > .home-sidebar-card-list {
  display: none;
}
.home-sidebar-section.open > .home-sidebar-card-list {
  display: block;
}

/* ============================================================
   EVENT-AD VARIANTS — moved to static/css/ad/layouts.css.
   All .ep-ad-event--v1..v8 rules below were deleted on 2026-04-17;
   the tokenized brand-color system is now the single source of
   truth. Keep this file free of event-ad rules.
   ============================================================ */


/* ============================================================================
   Bottom-anchored preview panel layout (Apr 2026)
   - 135px slot pinned to the bottom of the preview card (matches gallery)
     -> ad image for unpublished items, stat cards for published/premade
   - Price-row sits directly above the slot, no extra gap beyond card padding
   - Top content area gets padding-bottom so it doesn't slide under the slot
   ============================================================================ */
.activity-preview-combined {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#explorePreviewCards .ep-ad,
#explorePreviewCards #ep-ad {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  height: 135px;
}
#explorePreviewCards .ep-ad img,
#explorePreviewCards #ep-ad img {
  height: 135px;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

#explorePreviewCards .ep-bottom-stats {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 135px;
  overflow: hidden;
}
#explorePreviewCards .ep-bottom-stats .ep-key-stats-wrap {
  padding-top: 0;
  height: 100%;
}
#explorePreviewCards .ep-bottom-stats .ep-key-stats {
  height: 100%;
  margin: 0;
  grid-template-columns: repeat(2, 1fr);
}

/* Price row pinned flush above the bottom slot so the two never overlap */
#explorePreviewCards .ep-credits,
#explorePreviewCards #ep-credits {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 135px;
  top: auto;
  margin: 0;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}
/* Hide the credits' built-in top divider; we draw a separate line below */
#explorePreviewCards .ep-credits::before { display: none; }

/* Standalone divider line drawn at exactly 200px from the card bottom,
   matching the 0.75px gray-light hairlines used by the left list. */
#explorePreviewCards .activity-preview-combined::after { content: none; }

@media (max-width: 768px) {
  /* Mobile click-to-expand inline preview on /explore.
     Base .row-inline-preview / .rip-* styles come from work.css
     because /explore shares the .mw-page wrapper class. These
     overrides remove the 4-line clamp on the description, render
     the "Show more" toggle as a plain text link, hide the extras
     by default, and lay out audience / how-it-works / pricing as
     run-on inline text (label bolded, value flowing after) to
     mirror the desktop preview pane treatment in free.css. */
  #explorePage .row-inline-preview .rip-desc {
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
    text-overflow: clip;
  }
  #explorePage .row-inline-preview .rip-show-more {
    background: none;
    border: 0;
    outline: none;
    padding: var(--space-1-5) 0 2px;
    margin: 0;
    font-size: 13px;
    font-weight: var(--font-weight-normal);
    color: #1a1a1a;
    text-decoration: underline;
    cursor: pointer;
    display: inline;
    line-height: 1.4;
  }
  #explorePage .row-inline-preview .rip-extra {
    display: none;
  }
  #explorePage .row-inline-preview .rip-extra.open {
    display: block;
  }
  #explorePage .row-inline-preview .rip-extra .rip-meta-row {
    display: block;
    margin: 0 0 var(--space-2);
    line-height: 1.5;
    font-size: 13.5px;
  }
  #explorePage .row-inline-preview .rip-extra .rip-meta-row:last-child {
    margin-bottom: 0;
  }
  #explorePage .row-inline-preview .rip-extra .rip-meta-label {
    display: inline;
    font-weight: var(--font-weight-bold);
    color: #1a1a1a;
    white-space: normal;
  }
  #explorePage .row-inline-preview .rip-extra .rip-meta-val {
    display: inline;
    color: #1a1a1a;
  }
}

/* ============================================================================
   /explore search pill — desktop input-wrap stretch
   ----------------------------------------------------------------------------
   On /explore the input lives inside .free-search-input-wrap (so the inline
   × clear button can sit beside it). Without an explicit flex rule the wrap
   collapses to its content width, which leaves a wide empty band of dead
   pill to the right of the input. The mobile media-query block in free.css
   already does this; pull the same behaviour up to desktop so the input
   visibly fills the pill at all viewport widths.
   ========================================================================== */
.free-page#explorePage .free-search-input-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
}
.free-page#explorePage .free-search-input-wrap .free-search-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}
.free-page#explorePage .free-search-pill .search-filter-btn {
  margin-left: auto;
  flex: 0 0 auto;
}

