/* ═══════════════════════════════════════════════════════════════════════════
   EXPERTS INTAKE — Request type intake funnel
   ═══════════════════════════════════════════════════════════════════════════ */

#experts-intake {
  position: fixed;
  inset: 0;
  background: #F9F8F6;
  z-index: 10000;
  overflow: hidden;
  animation: intakeFadeIn 0.2s ease;
}

@keyframes intakeFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

#experts-intake.intake-fade-out {
  animation: intakeFadeOut 0.2s ease forwards;
}

@keyframes intakeFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.intake-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── Header ────────────────────────────────────────────────────────────────── */

.intake-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid #E8E7E3;
}

.intake-back-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.15s;
}

.intake-back-btn:hover {
  background: #F4F3EE;
}

.intake-brand-text {
  font-size: 15px;
  font-weight: 500;
  color: #1A1918;
}

.intake-brand-accent {
  color: #ff005c;
}

.intake-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.intake-submit-request-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #ff005c 0%, #ff3d7f 100%);
  border: 1px solid #ff005c;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: all 0.15s;
}

.intake-submit-request-btn:hover {
  background: linear-gradient(135deg, #e00050 0%, #ff005c 100%);
  box-shadow: 0 2px 8px rgba(255, 0, 92, 0.3);
}

.intake-submit-request-btn svg {
  flex-shrink: 0;
}

.intake-submit-request-btn .beta-tag {
  padding: 2px 5px;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 3px;
  margin-left: 2px;
}

.intake-calculators-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #E8E7E3;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #5C5A54;
  cursor: pointer;
  transition: all 0.15s;
}

.intake-calculators-btn:hover {
  background: #F4F3EE;
  border-color: #ff005c;
  color: #1A1918;
}

.intake-calculators-btn svg {
  flex-shrink: 0;
}

/* ─── Content ───────────────────────────────────────────────────────────────── */

.intake-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px 60px;
}

.intake-title-section {
  max-width: 800px;
  margin: 0 auto 32px;
  text-align: center;
}

.intake-subtitle {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ff005c;
  margin-bottom: 8px;
}

.intake-title {
  font-size: 32px;
  font-weight: 700;
  color: #1A1918;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.intake-desc {
  font-size: 15px;
  color: #5C5A54;
  line-height: 1.6;
  margin: 0;
}

/* ─── Funnel ────────────────────────────────────────────────────────────────── */

.intake-funnel {
  max-width: 900px;
  margin: 0 auto;
}

.intake-funnel-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.funnel-start {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #E8E7E3;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #1A1918;
}

.funnel-icon {
  color: #ff005c;
}

.funnel-arrow {
  color: #CDCBC4;
  margin: 8px 0;
}

.funnel-label {
  font-size: 12px;
  font-weight: 600;
  color: #8A8880;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ─── Funnel Steps ──────────────────────────────────────────────────────────── */

.funnel-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #E8E7E3;
  border-radius: 10px;
  padding: 14px 20px;
  min-width: 280px;
}

.funnel-step-optional {
  border-style: dashed;
  border-color: #CDCBC4;
}

.funnel-step-required {
  border-color: #ff005c;
  box-shadow: 0 2px 8px rgba(255, 0, 92, 0.08);
}

.funnel-step-badge {
  position: absolute;
  top: -8px;
  left: 16px;
  padding: 2px 8px;
  background: #F4F3EE;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #8A8880;
}

.funnel-step-badge.required {
  background: #ff005c;
  color: #fff;
}

.funnel-step-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.funnel-step-icon.slack-icon {
  background: #4A154B;
  color: #fff;
}

.funnel-step-icon.jira-icon {
  background: #0052CC;
  color: #fff;
}

.funnel-step-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.funnel-step-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

.funnel-step-wrapper .funnel-create-link {
  position: absolute;
  left: calc(50% + 170px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
}

.funnel-step-title {
  font-size: 14px;
  font-weight: 600;
  color: #1A1918;
}

.funnel-create-link {
  font-size: 13px;
  font-weight: 500;
  color: #0369A1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #E0F2FE;
  border-radius: 6px;
  transition: all 0.15s;
}

.funnel-create-link:hover {
  background: #BAE6FD;
  color: #0369A1;
  text-decoration: none;
}

.funnel-step-note {
  font-size: 12px;
  color: #8A8880;
}

/* ─── Type Cards ────────────────────────────────────────────────────────────── */

.intake-types {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.intake-type-card {
  background: #fff;
  border: 1px solid #E8E7E3;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.intake-type-card:hover {
  border-color: var(--type-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.intake-type-card.expanded {
  border-color: var(--type-color);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.intake-type-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
}

.intake-type-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--type-bg);
  color: var(--type-color);
  font-family: 'SF Mono', 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
}

.intake-type-info {
  flex: 1;
  min-width: 0;
}

.intake-type-name {
  font-size: 16px;
  font-weight: 600;
  color: #1A1918;
  margin-bottom: 2px;
}

.intake-type-desc {
  font-size: 13px;
  color: #5C5A54;
  line-height: 1.4;
}

.intake-type-owners {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.intake-owner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--type-bg);
  border: 1px solid var(--type-color);
  border-radius: 6px;
  font-size: 13px;
  color: var(--type-color);
  font-weight: 600;
}

.intake-owner-label {
  color: #5C5A54;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  background: rgba(0,0,0,0.06);
  border-radius: 3px;
}

.intake-type-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.intake-workflow-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--type-bg);
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--type-color);
  cursor: pointer;
  transition: all 0.15s;
}

.intake-workflow-btn:hover {
  border-color: var(--type-color);
  background: #fff;
}

.intake-expand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid #E8E7E3;
  border-radius: 6px;
  color: #8A8880;
  cursor: pointer;
  transition: all 0.15s;
}

.intake-expand-btn:hover {
  background: #F4F3EE;
  color: #1A1918;
}

/* ─── Criteria ──────────────────────────────────────────────────────────────── */

.intake-type-criteria {
  display: none;
  padding: 0 20px 20px;
  border-top: 1px solid #E8E7E3;
  margin-top: 0;
}

.intake-type-criteria.visible {
  display: block;
  animation: criteriaSlideIn 0.2s ease;
}

@keyframes criteriaSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.criteria-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8A8880;
  padding: 16px 0 12px;
}

.criteria-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.criterion-item {
  background: #F9F8F6;
  border-radius: 8px;
  padding: 12px 14px;
  border-left: 3px solid var(--type-color);
}

.criterion-item.highlight {
  background: var(--type-bg);
  border-left-width: 4px;
}

.criterion-item.reference {
  background: #fff;
  border: 1px dashed #CDCBC4;
  border-left: 3px solid var(--type-color);
}

.criterion-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--type-color);
  margin-bottom: 4px;
}

.criterion-desc {
  font-size: 13px;
  color: #5C5A54;
  line-height: 1.5;
}

.criterion-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.criterion-option {
  display: inline-block;
  padding: 4px 10px;
  background: #fff;
  border: 1px solid #E8E7E3;
  border-radius: 4px;
  font-size: 12px;
  color: #1A1918;
}

.criterion-ref-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid #E8E7E3;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--type-color);
  cursor: pointer;
  transition: all 0.15s;
}

.criterion-ref-btn:hover {
  border-color: var(--type-color);
  background: var(--type-bg);
}

.criteria-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 14px;
  background: #FFF8E7;
  border-radius: 8px;
  font-size: 13px;
  color: #85660D;
  line-height: 1.5;
}

.criteria-note svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* ─── Tutorial Button ──────────────────────────────────────────────────────── */

.intake-tutorial-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #E8E7E3;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #5C5A54;
  transition: all 0.15s;
  margin-left: auto;
}

.intake-tutorial-btn:hover {
  background: #F4F3EE;
  border-color: #ff005c;
  color: #1A1918;
}

.intake-tutorial-btn svg {
  color: #8A8880;
}

.intake-tutorial-btn:hover svg {
  color: #ff005c;
}

/* ─── Tutorial Overlay ─────────────────────────────────────────────────────── */

.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  pointer-events: none;
}

.tutorial-overlay.hidden {
  display: none;
  pointer-events: none !important;
}

.tutorial-overlay.hidden * {
  pointer-events: none !important;
}

.tutorial-scrim {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: auto;
  z-index: 10001;
}

.tutorial-highlight {
  position: fixed;
  border-radius: 8px;
  border: 3px solid #ff005c;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
  background: transparent;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 10002;
}


.tutorial-popup {
  position: fixed;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  z-index: 10003;
  pointer-events: auto;
  animation: tutorialPopupIn 0.25s ease;
}

@keyframes tutorialPopupIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tutorial-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tutorial-step-indicator {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff005c;
}

.tutorial-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #8A8880;
  transition: all 0.15s;
}

.tutorial-close-btn:hover {
  background: #F4F3EE;
  color: #1A1918;
}

.tutorial-title {
  font-size: 18px;
  font-weight: 600;
  color: #1A1918;
  margin: 0 0 8px;
}

.tutorial-desc {
  font-size: 14px;
  color: #5C5A54;
  line-height: 1.6;
  margin: 0 0 20px;
}

.tutorial-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.tutorial-btn {
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.tutorial-btn-secondary {
  background: #fff;
  border: 1px solid #E8E7E3;
  color: #5C5A54;
}

.tutorial-btn-secondary:hover {
  background: #F4F3EE;
  border-color: #CDCBC4;
  color: #1A1918;
}

.tutorial-btn-primary {
  background: #ff005c;
  border: 1px solid #ff005c;
  color: #fff;
}

.tutorial-btn-primary:hover {
  background: #e00050;
  border-color: #e00050;
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .intake-content {
    padding: 24px 20px 40px;
  }

  .intake-title {
    font-size: 26px;
  }

  .intake-type-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .intake-type-info {
    flex: 1 1 calc(100% - 52px);
    order: 1;
  }

  .intake-type-num {
    order: 0;
  }

  .intake-type-actions {
    order: 2;
    width: 100%;
    justify-content: flex-end;
  }

  .criteria-list {
    grid-template-columns: 1fr;
  }
}
