/* BC Emprega — Página de vagas (estilo LinkedIn/Indeed) */

.vagas-page .topbar .btn {
  border-radius: 5px !important;
}

.vagas-page {
  height: 100vh;
  overflow: hidden;
  background: #F3F2EF;
  color: var(--text);
}

/* Topbar compacta nesta página */
.vagas-page .topbar {
  height: 72px;
  min-height: 72px;
  padding: 10px 32px;
  flex-wrap: nowrap;
}

.vagas-page .brand-area {
  min-width: 0;
  flex: 0 1 auto;
  gap: 12px;
}

.vagas-page .logo-governo {
  width: 120px;
  height: 56px;
}

.vagas-page .logo-prefeitura {
  width: 110px;
  height: 46px;
}

.vagas-page .logo-bc {
  width: 150px;
}

.vagas-page .divider {
  height: 40px;
}

.vagas-page .nav-menu {
  display: flex;
  margin-left: auto;
  gap: 20px;
  font-size: 13px;
}

.vagas-page .nav-menu a:focus,
.vagas-page .nav-menu a:hover {
  text-decoration: none !important;
}

.vagas-page .nav-menu a.nav-active {
  color: var(--blue);
  border-bottom: 2px solid var(--blue);
  padding-bottom: 4px;
}

.vagas-page .actions .btn {
  padding: 10px 18px;
  font-size: 13px;
}

/* Main layout */
.vagas-main {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 72px);
  min-height: 0;
}

/* Hero de busca */
.vagas-search-section {
  margin: 15px;
}

.vagas-search-hero {
  flex-shrink: 0;
  background: var(--white);
  border-bottom: 1px solid #E8E8E8;
  padding: 28px 0 22px;
  width: 100%;
}

.vagas-search-hero.portal-container {
  width: min(1280px, calc(100% - 48px));
}

.vagas-page h1.vagas-search-title {
  margin: 0 0 10px;
  font-size: clamp(26px, 2.2vw, 34px);
  font-weight: 800;
  color: var(--blue-dark);
  letter-spacing: -0.02em;
  line-height: 1.25;
  white-space: normal;
  overflow: visible;
}

.vagas-search-subtitle {
  margin: 0 0 22px;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.5;
  max-width: 640px;
}

.vagas-search-form {
  width: 100%;
}

.vagas-search-fields {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.vagas-search-field.portal-form-field {
  margin: 0;
  min-width: 0;
  gap: 0;
}

.vagas-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.vagas-search-field.portal-form-field select {
  cursor: pointer;
}

.vagas-search-field.portal-form-field select:disabled {
  cursor: not-allowed;
  background: #f5f7fb;
  color: var(--muted);
}

.vagas-search-field-action {
  display: flex;
  align-items: stretch;
}

.vagas-search-submit {
  min-height: 52px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
}

.vagas-quick-filters {
  margin-top: 18px;
}

.vagas-page .vagas-quick-pill {
  color: var(--blue-dark);
  background: var(--white);
  padding: 7px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid #D8DEEA;
}

.vagas-page .vagas-quick-pill:focus,
.vagas-page .vagas-quick-pill:hover {
  text-decoration: none !important;
  background: #F3F6FB;
  border-color: #C5D0E8;
}

.vagas-page .vagas-quick-pill.is-active {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}

.vagas-page .vagas-quick-pill.is-active:hover {
  background: #2548d4;
  color: var(--white);
  border-color: #2548d4;
}

.vagas-quick-pill--visual {
  cursor: default;
}

.vagas-more-filters {
  border: 1px solid var(--line) !important;
  background: var(--white) !important;
  color: var(--blue-dark) !important;
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vagas-more-filters svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.vagas-more-filters:hover {
  background: #F3F6FB !important;
}

.vagas-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

.vagas-filter-chip {
  background: #EEF2FF;
  color: var(--blue-dark);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.vagas-clear-filters {
  color: var(--blue);
  font-weight: 700;
}

.vagas-results-header {
  flex-shrink: 0;
  padding: 14px 20px;
  border-bottom: 1px solid #E8E8E8;
  background: var(--white);
}

.vagas-results-header h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

/* Workspace split */
.vagas-workspace {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid #E8E8E8;
}

.vagas-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  min-height: 0;
  background: var(--white);
}

/* Lista — coluna esquerda */
.vagas-jobs-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid #E8E8E8;
  background: var(--white);
}

.vagas-jobs-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 16px;
  scrollbar-width: thin;
  scrollbar-color: #C5C5C5 transparent;
}

.vagas-jobs-scroll::-webkit-scrollbar {
  width: 6px;
}

.vagas-jobs-scroll::-webkit-scrollbar-thumb {
  background: #C5C5C5;
  border-radius: 999px;
}

/* Item da lista — card */
.vagas-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 16px;
  margin-bottom: 10px;
  border: 1px solid #E8E8E8;
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.vagas-row:last-child {
  margin-bottom: 0;
}

.vagas-row:hover {
  border-color: #CED6E8;
  box-shadow: 0 4px 14px rgba(9, 27, 79, .06);
}

.vagas-row.is-active {
  border-color: var(--blue);
  background: #F8FAFF;
  box-shadow: 0 4px 14px rgba(5, 81, 200, .1);
}

.vagas-row-head {
  display: block;
}

.vagas-row-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.35;
}

.vagas-row-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #666666;
  line-height: 1.4;
}

.vagas-row-location svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: #888888;
}

.vagas-row-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.vagas-row-contract {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #F3F2EF;
  color: #555555;
  font-size: 12px;
  font-weight: 600;
}

.vagas-row-salary {
  margin-left: auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
}

/* Paginação */
.vagas-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-top: 1px solid #E8E8E8;
  flex-shrink: 0;
}

.vagas-page-link,
.vagas-page-current {
  min-width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-weight: 600;
  font-size: 13px;
}

.vagas-page-link {
  border: 1px solid #D0D0D0;
  background: var(--white);
  color: var(--blue);
}

.vagas-page-link:hover {
  background: #F3F6FB;
  border-color: var(--blue);
}

.vagas-page-current {
  background: var(--blue);
  color: var(--white);
}

/* Detalhe — coluna direita */
.vagas-job-detail {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--white);
}

.vagas-detail-panel {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #C5C5C5 transparent;
}

.vagas-detail-panel::-webkit-scrollbar {
  width: 6px;
}

.vagas-detail-panel::-webkit-scrollbar-thumb {
  background: #C5C5C5;
  border-radius: 999px;
}

.vagas-detail-panel.is-visible:not([hidden]) {
  display: flex;
}

.vagas-detail-panel[hidden] {
  display: none !important;
}

/* Sticky top bar do detalhe */
.vagas-detail-top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
  background: var(--white);
  border-bottom: 1px solid #E8E8E8;
}

.vagas-detail-top-main {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.vagas-detail-brand {
  flex-shrink: 0;
}

.vagas-detail-top-copy {
  flex: 1;
  min-width: 0;
}

.vagas-detail-top-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--blue-dark);
  letter-spacing: -0.02em;
}

.vagas-detail-top-company {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.vagas-detail-top-location {
  margin: 0;
  font-size: 14px;
  color: #666666;
}

.vagas-detail-top-extra {
  margin: 8px 0 0;
  font-size: 13px;
  color: #666666;
}

.vagas-detail-top-actions {
  flex-shrink: 0;
}

.vagas-detail-top-actions .btn-primary {
  padding: 10px 24px;
  font-size: 14px;
  white-space: nowrap;
}

/* Corpo do detalhe */
.vagas-detail-body {
  padding: 24px 28px 32px;
}

.vagas-detail-section {
  margin-bottom: 28px;
}

.vagas-detail-section:last-child {
  margin-bottom: 0;
}

.vagas-detail-section h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-dark);
}

.vagas-detail-text {
  margin: 0;
  max-width: 72ch;
  font-size: 15px;
  line-height: 1.7;
  color: #333333;
  white-space: pre-wrap;
}

.vagas-detail-list {
  margin: 0;
  padding: 0 0 0 20px;
  max-width: 72ch;
  font-size: 15px;
  line-height: 1.7;
  color: #333333;
}

.vagas-detail-list li {
  margin-bottom: 6px;
}

.vagas-detail-list li::marker {
  color: var(--blue);
}

.vagas-benefits-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vagas-benefits-chips span {
  background: #F3F2EF;
  color: #333333;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 14px;
}

.vagas-detail-meta {
  padding: 16px 28px 24px;
  border-top: 1px solid #E8E8E8;
}

.vagas-detail-meta small {
  font-size: 12px;
  color: #888888;
}

/* Company marks (detalhe) */
.vagas-page .company-mark {
  width: 50px;
  height: 50px;
  border-radius: 4px;
  background: var(--blue-dark);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
}

.vagas-page .company-mark--logo {
  background: var(--white);
  border: 1px solid #E8E8E8;
  padding: 0;
}

.vagas-page .company-mark--logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Empty state */
.vagas-empty-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: var(--white);
}

.vagas-empty {
  text-align: center;
  max-width: 420px;
}

.vagas-empty h2 {
  margin: 0 0 10px;
  font-size: 22px;
  color: var(--blue-dark);
}

.vagas-empty p {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.vagas-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* Tablet */
@media (max-width: 1100px) {
  .vagas-page .topbar {
    flex-wrap: wrap;
    height: auto;
    min-height: 72px;
    padding: 12px 20px;
    gap: 12px;
  }

  .vagas-page .brand-area {
    width: 100%;
    justify-content: center;
  }

  .vagas-page .nav-menu {
    margin-left: 0;
    flex: 1 1 100%;
    justify-content: center;
  }

  .vagas-page .actions {
    width: 100%;
    justify-content: center;
  }

  .vagas-search-hero {
    padding: 24px 0 20px;
  }

  .vagas-search-fields {
    grid-template-columns: 1fr 1fr;
  }

  .vagas-search-field.portal-form-field:first-child {
    grid-column: 1 / -1;
  }

  .vagas-search-field-action {
    grid-column: 1 / -1;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .vagas-page {
    height: auto;
    overflow: visible;
  }

  .vagas-main {
    height: auto;
    min-height: calc(100vh - 72px);
  }

  .vagas-layout {
    grid-template-columns: 1fr;
  }

  .vagas-jobs-list {
    border-right: 0;
    border-bottom: 1px solid #E8E8E8;
  }

  .vagas-jobs-scroll {
    max-height: 40vh;
    flex: none;
  }

  .vagas-job-detail {
    min-height: 50vh;
  }

  .vagas-detail-top {
    flex-direction: column;
    padding: 20px;
  }

  .vagas-detail-top-actions {
    width: 100%;
  }

  .vagas-detail-top-actions .btn-primary {
    display: block;
    width: 100%;
    text-align: center;
  }

  .vagas-detail-body {
    padding: 20px;
  }

  .vagas-detail-meta {
    padding: 16px 20px 24px;
  }

  .vagas-search-hero {
    padding: 24px 0 20px;
  }
}

@media (max-width: 640px) {
  .vagas-page .nav-menu {
    display: none;
  }

  .vagas-search-hero {
    padding: 20px 0 16px;
  }

  .vagas-search-subtitle {
    margin-bottom: 18px;
    font-size: 15px;
  }

  .vagas-search-hero.portal-container {
    width: min(100% - 24px, 1280px);
  }

  .vagas-page h1.vagas-search-title {
    font-size: 24px;
  }

  .vagas-search-fields {
    grid-template-columns: 1fr;
  }

  .vagas-search-field.portal-form-field:first-child {
    grid-column: auto;
  }

  .vagas-search-submit {
    width: 100%;
  }

}
