/*
 * Poesis - Ashby Job Board Custom CSS
 * Dark teal/slate theme matching poesis.ai
 */

/* ---------- Ashby theme variables ---------------------------------------- */

:root {
  /* Primary colors */
  --colorPrimary900: #2b363b;
  --colorPrimary600: #7c8cff;

  /* Job board width */
  --widthMaxJobBoard: 900px;

  /* Radii */
  --borderRadiusContainer: 12px;
  --borderRadiusControl: 8px;
  --borderRadiusButton: 8px;

  /* Font family */
  --fontFamily: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Background color behind the entire job board */
  --colorAppBackground: #2b363b;

  --colorNeutral200: #3a474d;

  /* Try every possible spacing variable name */
  --spacing: 2.5rem;
  --spacingXl: 2.5rem;
  --spacingLg: 2.5rem;
  --spacingLarge: 2.5rem;
  --spacingHeader: 2.5rem;
  --spacingLogo: 2.5rem;
  --spacingLogoBottom: 2.5rem;
  --spacingTop: 2.5rem;
  --spacingSection: 2.5rem;
  --headerSpacing: 2.5rem;
  --logoSpacing: 2.5rem;
  --logoMargin: 2.5rem;
  --logoMarginBottom: 2.5rem;
  --headerMargin: 2.5rem;
  --headerMarginBottom: 2.5rem;
  --sectionSpacing: 2.5rem;
  --sectionMargin: 2.5rem;
  --contentSpacing: 2.5rem;
  --contentMarginTop: 2.5rem;
  --descriptionMarginTop: 2.5rem;
  --jobBoardSpacing: 2.5rem;
  --jobBoardHeaderSpacing: 2.5rem;
  --gapLg: 2.5rem;
  --gapXl: 2.5rem;
  --gap: 2.5rem;
}

/* ---------- Custom design tokens ----------------------------------------- */

:root {
  --poesis-bg: #2b363b;
  --poesis-bg-elevated: #323f44;
  --poesis-bg-elevated-soft: #3a474d;
  --poesis-bg-soft: #424f55;
  --poesis-border-subtle: rgba(255, 255, 255, 0.1);
  --poesis-border-strong: rgba(255, 255, 255, 0.2);

  --poesis-text: #ffffff;
  --poesis-text-strong: #ffffff;
  --poesis-text-muted: #e0e6e8;
  --poesis-text-soft: #b8c4c8;

  --poesis-accent: #7c8cff;
  --poesis-accent-soft: rgba(124, 140, 255, 0.15);
  --poesis-accent-strong: #9ba8ff;

  --poesis-danger: #ff453a;

  --poesis-radius-sm: 4px;
  --poesis-radius-md: 8px;
  --poesis-radius-lg: 12px;

  --poesis-shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.3);
  --poesis-shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.2);

  --poesis-font-sans: var(--fontFamily);
}

/* ---------- Global styles (like Flux) ------------------------------------ */

html,
body {
  margin: 0;
  padding: 0;
  padding-top: 2rem !important;
  background-color: var(--poesis-bg);
  color: var(--poesis-text-muted);
  font-family: var(--poesis-font-sans);
  -webkit-font-smoothing: antialiased;
}

a:visited {
  color: var(--colorPrimary600) !important;
}

/* ---------- Job board main heading (Open Positions) ---------------------- */

.ashby-job-board-heading {
  font-size: 2rem;
  color: var(--poesis-text-strong);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2.5rem !important;
  margin-bottom: 0.5rem !important;
}

.ashby-job-board-heading-count {
  color: var(--poesis-text-soft);
  font-size: 1rem;
  font-weight: 400;
}

/* ---------- Department headings ------------------------------------------ */

.ashby-department-heading,
.ashby-department-heading-level {
  font-size: 0.875rem;
  color: var(--poesis-text-muted);
  margin-top: 1.5rem !important;
  margin-bottom: 0.75rem !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- Filter bar --------------------------------------------------- */

.ashby-job-board-filters-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--poesis-text-soft);
  font-size: 0.875rem;
}

.ashby-job-board-reset-filters-label {
  cursor: pointer;
  color: var(--poesis-text-soft);
  font-size: 0.875rem;
}

.ashby-job-board-reset-filters-label:hover {
  color: var(--poesis-accent);
}

.ashby-job-board-filter {
  background-color: var(--poesis-bg-elevated) !important;
  border-radius: var(--borderRadiusControl) !important;
  border: 1px solid var(--poesis-border-subtle) !important;
  color: var(--poesis-text-muted) !important;
  padding: 0.75rem 1rem !important;
  font-family: var(--poesis-font-sans) !important;
  font-size: 0.9375rem !important;
  min-width: 160px;
  outline: none !important;
}

.ashby-job-board-filter:hover {
  border-color: var(--poesis-border-strong) !important;
  background-color: var(--poesis-bg-elevated-soft) !important;
}

.ashby-job-board-filter:focus {
  border-color: var(--poesis-accent) !important;
}

/* ---------- Job list view ------------------------------------------------ */

.ashby-job-posting-brief-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  margin-top: 0.5rem !important;
}

.ashby-job-posting-brief {
  border-radius: var(--poesis-radius-lg);
  border: 1px solid var(--poesis-border-subtle);
  background-color: rgba(255, 255, 255, 0.04);
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--poesis-text-muted);
  transition: all 0.2s ease;
}

.ashby-job-posting-brief:hover {
  background-color: rgba(255, 255, 255, 0.07);
  border-color: var(--poesis-border-strong);
  transform: translateY(-2px);
  box-shadow: var(--poesis-shadow-subtle);
}

.ashby-job-posting-brief-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--poesis-text-strong);
  text-decoration: none;
}

.ashby-job-posting-brief-title:hover {
  color: var(--poesis-accent-strong);
}

.ashby-job-posting-brief-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.9375rem;
  color: var(--poesis-text-soft);
}

.ashby-job-posting-brief-department-heading,
.ashby-job-posting-brief-department-heading-level {
  font-size: 0.875rem;
  color: var(--poesis-text-muted);
  margin-top: 1.5rem !important;
  margin-bottom: 0.75rem !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- Job detail view ---------------------------------------------- */

.ashby-job-posting-header {
  margin-bottom: 16px;
}

.ashby-job-posting-heading {
  font-size: 2.25rem;
  color: var(--poesis-text-strong);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  line-height: 1.2;
}

/* Left (description) pane */
.ashby-job-posting-left-pane {
  background-color: var(--poesis-bg-elevated) !important;
  border-radius: var(--poesis-radius-lg);
  border: 1px solid var(--poesis-border-subtle);
  padding: 1.5rem;
  color: var(--poesis-text-muted);
}

/* Right (tabs/application) pane */
.ashby-job-posting-right-pane {
  background-color: var(--poesis-bg-elevated) !important;
  border-radius: var(--poesis-radius-lg);
  border: 1px solid var(--poesis-border-subtle);
  box-shadow: var(--poesis-shadow-soft);
  padding: 1.5rem;
  margin-top: 1.5rem;
  color: var(--poesis-text-muted);
}

/* CRITICAL: Nuke any inner white boxes */
.ashby-job-posting-left-pane *,
.ashby-job-posting-right-pane * {
  background-color: transparent !important;
}

/* Paragraphs & lists in description area */
.ashby-job-posting-left-pane p,
.ashby-job-posting-left-pane li {
  color: var(--poesis-text-muted) !important;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Section headings in job description */
.ashby-job-posting-left-pane h1,
.ashby-job-posting-left-pane h2,
.ashby-job-posting-left-pane h3,
.ashby-job-posting-left-pane h4,
.ashby-job-posting-left-pane strong,
.ashby-job-posting-left-pane b {
  color: var(--poesis-text-strong) !important;
}

.ashby-job-posting-left-pane h3 {
  margin-top: 1.5rem;
  font-size: 1.05rem;
}

/* Lists in job description */
.ashby-job-posting-left-pane ul,
.ashby-job-posting-left-pane ol {
  margin-left: 0;
  padding-left: 1.5em;
}

.ashby-job-posting-left-pane ul li,
.ashby-job-posting-left-pane ol li {
  margin-bottom: 6px;
}

/* Links in description section */
.ashby-job-posting-left-pane a {
  color: var(--poesis-accent) !important;
}

.ashby-job-posting-left-pane a:hover {
  color: var(--poesis-accent-strong) !important;
}

/* Right pane text */
.ashby-job-posting-right-pane p,
.ashby-job-posting-right-pane li,
.ashby-job-posting-right-pane span {
  color: var(--poesis-text-muted) !important;
}

.ashby-job-posting-right-pane h1,
.ashby-job-posting-right-pane h2,
.ashby-job-posting-right-pane h3,
.ashby-job-posting-right-pane h4,
.ashby-job-posting-right-pane strong,
.ashby-job-posting-right-pane b {
  color: var(--poesis-text-strong) !important;
}

/* ---------- Tabs (Overview / Application) -------------------------------- */

.ashby-job-posting-right-pane-application-tab,
.ashby-job-posting-right-pane-overview-tab {
  background: transparent;
  border: none;
  color: var(--poesis-text-soft);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-family: var(--poesis-font-sans);
  font-weight: 500;
  cursor: pointer;
}

.ashby-job-posting-right-pane-application-tab[data-state="active"],
.ashby-job-posting-right-pane-overview-tab[data-state="active"] {
  color: var(--poesis-text-strong);
  background-color: var(--poesis-accent-soft);
}

/* ---------- Application form --------------------------------------------- */

.ashby-application-form-container {
  margin-top: 1rem;
}

.ashby-application-form-section-container {
  margin-bottom: 1.5rem;
}

.ashby-application-form-section-header-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--poesis-text-strong) !important;
}

.ashby-application-form-section-header-description {
  font-size: 0.9375rem;
  color: var(--poesis-text-soft) !important;
}

.ashby-application-form-field-entry {
  margin-bottom: 1.25rem;
}

.ashby-application-form-question-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--poesis-text-muted) !important;
  display: block;
  margin-bottom: 0.5rem;
}

.ashby-application-form-question-description {
  font-size: 0.875rem;
  color: var(--poesis-text-soft) !important;
  line-height: 1.5;
}

/* Submit button */
.ashby-application-form-submit-button {
  background: var(--poesis-accent) !important;
  color: #ffffff !important;
  font-family: var(--poesis-font-sans);
  font-size: 1rem;
  font-weight: 600;
  padding: 1rem 2rem !important;
  border: none !important;
  border-radius: var(--borderRadiusButton);
  cursor: pointer;
  transition: background 0.2s ease;
}

.ashby-application-form-submit-button:hover {
  background: var(--poesis-accent-strong) !important;
}

/* ---------- Success / failure containers --------------------------------- */

.ashby-application-form-success-container {
  border-radius: var(--poesis-radius-lg);
  border: 1px solid rgba(52, 199, 89, 0.4);
  background-color: rgba(52, 199, 89, 0.15) !important;
  padding: 1.5rem;
  color: #34c759 !important;
}

.ashby-application-form-failure-container {
  border-radius: var(--poesis-radius-lg);
  border: 1px solid rgba(255, 69, 58, 0.4);
  background-color: rgba(255, 69, 58, 0.15) !important;
  padding: 1.5rem;
  color: var(--poesis-danger) !important;
}

.ashby-application-form-blocked-application-container {
  border-radius: var(--poesis-radius-lg);
  border: 1px solid var(--poesis-border-subtle);
  background-color: var(--poesis-bg-elevated) !important;
  padding: 1.5rem;
}

/* ---------- Surveys ------------------------------------------------------ */

.ashby-survey-form-container {
  margin-top: 1.5rem;
  border-radius: var(--poesis-radius-lg);
  border: 1px solid var(--poesis-border-subtle);
  background-color: var(--poesis-bg-elevated) !important;
  padding: 1.5rem;
}

/* ---------- Responsiveness ----------------------------------------------- */

@media (max-width: 768px) {
  .ashby-job-board-heading {
    font-size: 1.75rem;
  }
  
  .ashby-job-posting-heading {
    font-size: 1.75rem;
  }

  .ashby-job-posting-left-pane,
  .ashby-job-posting-right-pane {
    padding: 1rem;
  }

  .ashby-job-posting-brief {
    padding: 1rem;
  }

  .ashby-job-posting-brief-details {
    flex-direction: column;
    align-items: flex-start;
  }
}
