/* ============================================================================
   FAANG-GRADE RECRUITER MODAL — High-Focus Performance Summary
   Style: Premium SaaS (Linear/Stripe) | Centered Modal Architecture
   ============================================================================ */

/* ── BACKDROP OVERLAY ── */
.recruiter-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.recruiter-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

/* ── CENTERED MODAL WINDOW ── */
.recruiter-modal {
  position: relative;
  width: 100%;
  max-width: 760px;
  max-height: 88vh; /* Tight fit but with breathing room */
  background: var(--bg-1, #ffffff);
  border-radius: 16px;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.1));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: var(--font-body, sans-serif);
}

.recruiter-overlay.open .recruiter-modal {
  transform: scale(1);
}

/* ── HEADER (Who & Where) ── */
.rm-header {
  padding: 32px 40px 24px;
  border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.05));
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.rm-header-info h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary, #172B4D);
  margin: 0 0 4px 0;
}

.rm-header-info .rm-location {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
  display: flex;
  align-items: center;
  gap: 6px;
}

.rm-close {
  background: #f4f5f7;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: var(--text-muted);
  transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rm-close:hover {
  background: #ebecf0;
  color: #172B4D;
}

/* ── MODAL BODY ── */
.rm-body {
  padding: 32px 40px;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-indigo) transparent;
}

/* Custom Scrollbar for Elite Feel */
.rm-body::-webkit-scrollbar {
  width: 5px;
}
.rm-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}
.dark-theme .rm-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
}

.rm-section {
  margin-bottom: 32px;
}

.rm-label {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: block;
}

/* Keyword Grid */
.rm-keyword-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rm-tag {
  padding: 6px 12px;
  background: var(--bg-1, #ffffff);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.rm-tag:hover {
  background: var(--bg-2);
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* MASSIVE IMPACT METRICS */
.rm-metrics-row {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

.rm-metric-card {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.rm-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.04);
  border-color: var(--border-hover);
}

.rm-metric-trend {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-indigo);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rm-metric-trend i {
  background: rgba(0, 101, 255, 0.1);
  padding: 4px;
  border-radius: 4px;
}

.rm-metric-num {
  font-family: var(--font-display, sans-serif);
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.rm-metric-label {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-secondary);
  font-weight: 500;
}

/* DE-JARGONIFIER TOGGLE */
.rm-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.rm-toggle-label {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.rm-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.rm-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.rm-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border);
  transition: 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  border-radius: 34px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.rm-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

input:checked + .rm-slider {
  background-color: var(--accent-indigo);
}

input:checked + .rm-slider:before {
  transform: translateX(20px);
}

/* Bullet Points */
.rm-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rm-bullet {
  position: relative;
  padding-left: 24px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.rm-bullet:before {
  content: '→';
  position: absolute;
  left: 0;
  color: #0C66E4;
  font-weight: 800;
}

/* ── FOOTER CTA ── */
.rm-footer {
  padding: 24px 40px 40px;
}

.rm-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  background: var(--accent-indigo);
  color: #fff;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 101, 255, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.rm-cta-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 101, 255, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

/* ── MODAL ACTION AREA (FOOTER UPGRADE) ── */
.modal-action-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-contact-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.rm-pill {
  background: var(--bg-1);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.rm-pill:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.04);
}

/* Success Micro-Interaction State */
.rm-pill.copied-success {
  border-color: #34A853 !important;
  color: #34A853 !important;
  background: rgba(52, 168, 83, 0.05) !important;
  pointer-events: none; /* Double-click prevention in CSS too */
}

/* Dark Mode Adjustments */
.dark-theme .rm-pill {
  border-color: rgba(255, 255, 255, 0.2);
  color: #A1A1AA;
}

.dark-theme .rm-pill:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.dark-theme .rm-pill.copied-success {
  border-color: #34A853 !important;
  color: #34A853 !important;
  background: rgba(52, 168, 83, 0.1) !important;
}

/* ── DARK THEME ── */
.dark-theme .recruiter-modal {
  background: #1e1e2e;
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .rm-header-info h2,
.dark-theme .rm-header-info .rm-location,
.dark-theme .rm-tag,
.dark-theme .rm-toggle-label,
.dark-theme .rm-bullet {
  color: #e2e8f0;
}

.dark-theme .rm-tag,
.dark-theme .rm-toggle-wrap {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .rm-close {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .rm-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ── MOBILE ADAPTATION (Elite Bottom Sheet) ── */
@media (max-width: 991px) {
  /* Backdrop Refinement */
  .recruiter-overlay {
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }

  /* Sheet Geometry */
  .recruiter-modal {
    width: 100% !important;
    max-width: none !important;
    border-radius: 24px 24px 0 0 !important;
    transform: translateY(100%) !important;
    max-height: 94vh !important; /* Slightly taller for more content */
    margin: 0 !important;
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.4) !important;
    overflow-y: auto !important; /* Ensure internal scrolling */
    -webkit-overflow-scrolling: touch !important; /* Smooth momentum for iOS */
  }


  .recruiter-overlay.open .recruiter-modal {
    transform: translateY(0) !important;
  }

  /* ── Drag Handle Cue ── */
  .rm-drag-handle {
    display: block !important;
    width: 44px;
    height: 6px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    margin: 14px auto 0;
    flex-shrink: 0;
  }

  .dark-theme .rm-drag-handle {
    background: rgba(255, 255, 255, 0.25);
  }

  /* ── Stacked Content Strategy ── */
  .rm-header {
    padding: 48px 24px 16px !important; /* Aggressive top padding for Notch-Safe view */
    flex-direction: column !important;
    gap: 12px;
    border-bottom: 1px solid var(--border) !important;
  }

  .rm-header-info h2 {
    font-size: 1.4rem !important;
    line-height: 1.2;
    font-weight: 800;
  }

  .rm-location {
    font-size: 0.85rem !important;
    opacity: 0.7;
  }

  .rm-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    font-size: 1.3rem !important;
    background: var(--bg-2) !important;
    border: 1px solid var(--border) !important;
    border-radius: 50% !important;
  }

  .rm-body {
    padding: 24px 20px 100px !important; /* Extra breathing room for floaters */
  }

  .rm-label {
    font-size: 0.75rem !important;
    letter-spacing: 0.05em !important;
    margin-bottom: 16px !important;
  }

  .rm-keyword-grid {
    gap: 10px !important;
    margin-bottom: 32px !important;
  }

  .rm-metrics-row {
    flex-direction: column !important;
    gap: 20px !important;
    margin-bottom: 32px !important;
  }

  .rm-metric-card {
    padding: 24px !important;
    width: 100% !important;
    border: 1px solid var(--border) !important;
  }

  .rm-metric-num {
    font-size: 2.8rem !important;
  }

  .rm-toggle-wrap {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px;
    margin-bottom: 28px !important;
    padding: 20px !important;
    background: var(--accent-hover) !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px;
  }

  .dark-theme .rm-toggle-wrap {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
  }

  .rm-toggle-label {
    color: var(--text-primary) !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
  }

  .rm-bullets {
    padding-left: 20px !important;
    margin-bottom: 40px !important;
  }

  .rm-bullet {
    font-size: 1rem !important;
    line-height: 1.7 !important;
    margin-bottom: 16px !important;
  }

  /* Elite Touch Switch */
  .rm-switch {
    width: 56px;
    height: 30px;
  }

  .rm-slider:before {
    height: 22px;
    width: 22px;
  }
}

/* Cleanup: Hide handle and reset modal for desktop */
.rm-drag-handle {
  display: none;
}


