/* Layout principal — usa variáveis de cor em styles.css */

html.app-shell {
  scroll-behavior: smooth;
}

body.app-shell {
  margin: 0;
  background: var(--bg);
  font-family: var(--font);
  color: var(--muted);
}

#center {
  background-color: var(--surface);
  margin: 0 auto;
  width: 1168px;
  max-width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
}

#header {
  background: var(--surface);
  margin: 0;
  padding: 0 10px 0 6px;
  width: 100%;
  min-height: 68px;
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}

#header #logo {
  float: none;
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  justify-content: flex-start;
  margin: 0;
}

#header #logo a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  line-height: 1.1;
  text-decoration: none;
  color: inherit;
  margin: 10px 4px 10px 4px;
}

.header-chrome {
  flex: 0 0 auto;
  margin-left: auto;
  text-align: right;
  padding: 8px 4px;
  min-width: 0;
  max-width: 100%;
}

.header-vagas-line {
  margin: 0;
  font: bold 14px/1.35 var(--font);
  color: var(--accent);
}

.header-vagas-line #cq-topo-vagas {
  font-weight: 800;
}

.header-vagas-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.header-vagas-link:hover {
  text-decoration: underline;
}

#header #logo .brand-cq-logo {
  width: auto;
  height: clamp(44px, 8vw, 56px);
  flex-shrink: 0;
  border: 0 none;
  object-fit: contain;
}

#header #logo .brand-cq-nome {
  width: auto;
  height: clamp(28px, 5vw, 40px);
  max-width: min(280px, 52vw);
  flex-shrink: 1;
  object-fit: contain;
  object-position: left center;
}

#header h1#logo {
  margin: 0;
  font: unset;
}

#cq-main-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
}

#menu {
  background-color: var(--surface);
  width: 200px;
  min-width: 200px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  box-sizing: border-box;
}

#menu ul {
  width: 200px;
  margin: 0 auto;
  padding: 0;
  background: var(--surface);
}

#menu ul li {
  border-top: 1px solid var(--border);
  position: relative;
  text-align: left;
  background: var(--surface);
  border-radius: 0 20px 20px 0;
  list-style: none;
}

#menu ul li a {
  padding: 10px 10px 22px 46px;
  display: block;
  min-height: 16px;
  text-decoration: none;
  font: bold 12px/14px var(--font);
  color: var(--accent);
}

#menu ul li a:hover {
  color: var(--text);
  background-color: var(--tag-bg);
  border-radius: 0 20px 20px 0;
}

#menu ul li > a .menu-i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  pointer-events: none;
}

#menu ul li > a .menu-i svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

#menu ul li > a:hover .menu-i {
  color: var(--text);
}

#menu ul li > a.menu-link-external::after {
  content: "";
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  margin-left: 0.15rem;
  border-style: solid;
  border-width: 1px 1px 0 0;
  border-color: currentColor;
  opacity: 0.45;
  transform: rotate(45deg);
  vertical-align: 0.15em;
}

#conteudo {
  background-color: var(--surface);
  border-left: 0;
  flex: 1;
  min-width: 0;
  min-height: 600px;
  padding: 10px 12px 80px;
  overflow: hidden;
  box-sizing: border-box;
}

#conteudo h1.cq-page-title {
  margin: 0.5rem 0 0.75rem;
  padding: 0;
  font: bold 26px/1.25 var(--font);
  color: var(--text);
}

.cq-search-wrap {
  max-width: 520px;
  margin: 8px auto 12px;
}

/* Lista dinâmica de cargos (cargos.html) */
.cargo-lista-section {
  margin: 0 auto 14px;
  max-width: 720px;
  padding: 0 4px;
}

.cargo-lista-heading {
  font: bold 1.05rem/1.3 var(--font);
  color: var(--text);
  margin: 0 0 0.35rem;
}

.cargo-lista-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.cargo-lista-mount {
  max-height: min(42vh, 380px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 6px);
  background: var(--elev, #f7faf9);
}

.cargo-lista-ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cargo-lista-ul li {
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.cargo-lista-ul li:last-child {
  border-bottom: none;
}

.cargo-lista-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.85rem;
  border: none;
  background: transparent;
  font: 0.9rem/1.35 var(--font);
  color: var(--accent);
  cursor: pointer;
  box-sizing: border-box;
}

.cargo-lista-item:hover,
.cargo-lista-item:focus-visible {
  background: var(--accent-soft, rgba(15, 118, 110, 0.12));
  outline: none;
}

.cq-search-form {
  display: flex;
  border: 1px solid var(--accent);
  border-radius: 6px;
  overflow: hidden;
}

.cq-search-form input {
  flex: 1;
  border: none;
  padding: 10px 12px;
  font: 15px var(--font);
  min-width: 0;
  background: var(--surface);
  color: var(--text);
}

.cq-search-form button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  font: bold 14px var(--font);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cq-search-form button svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.cq-search-form button:hover {
  background: var(--accent-hover);
}

.cq-toolbar-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin: 10px 0 14px;
  padding: 10px;
  background: var(--elev);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.cq-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cq-field label {
  font: bold 11px var(--font);
  color: var(--accent);
}

.cq-field input,
.cq-field select {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: 14px var(--font);
  min-width: 140px;
  background: var(--surface);
  color: var(--text);
}

#concursos ul.ul_estados {
  --estados-gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0 auto 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--estados-gap);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Largura para 14 itens na 1ª linha; na 2ª (13 itens) o justify-content centraliza o grupo */
#concursos ul.ul_estados li {
  display: block;
  margin: 0;
  min-width: 0;
  box-sizing: border-box;
  flex: 0 1 calc((100% - 13 * var(--estados-gap)) / 14);
  max-width: calc((100% - 13 * var(--estados-gap)) / 14);
}

#concursos ul.ul_estados li a {
  display: block;
  box-sizing: border-box;
  border-radius: 3px;
  border: 1px solid var(--border);
  margin: 0;
  padding: 8px 6px;
  font: bold 14px/13px var(--font);
  color: var(--accent);
  text-decoration: none;
  text-align: center;
  width: 100%;
}

#concursos ul.ul_estados li a:hover {
  text-decoration: none;
  border-color: var(--accent);
  color: var(--text);
  background: var(--tag-bg);
}

#concursos h2 {
  border: 0 none;
  padding: 15px 0;
  margin: 10px 0;
  background: none;
  background-size: 100% 1px;
  background-image:
    linear-gradient(to right, transparent, var(--accent), var(--accent), transparent),
    linear-gradient(to right, transparent, var(--accent), var(--accent), transparent);
  background-position: top, bottom;
  background-repeat: no-repeat;
  font: bold 28px/36px var(--font);
  text-align: center;
  color: var(--text);
}

#concursos .clear {
  clear: both;
}

#concursos .ua {
  margin-top: 20px;
  padding: 7px 15px 7px 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--elev) 85%, var(--border)) 0%, var(--elev) 100%);
  border: 1px solid var(--border);
  border-radius: 7px;
  text-align: right;
  font: bold 13px var(--font);
  color: var(--accent);
}

#concursos .uf {
  float: left;
  margin-left: 10px;
}

#concursos .uc {
  float: right;
}

#concursos .ud {
  clear: both;
}

#concursos .ea,
#concursos .da,
#concursos .na {
  border-bottom: 1px solid var(--surface);
  border-radius: 7px;
  cursor: pointer;
}

#concursos .ea {
  background: color-mix(in srgb, var(--accent) 8%, var(--elev));
}

#concursos .da {
  background: color-mix(in srgb, #ca8a04 12%, var(--elev));
}

#concursos .na {
  background: color-mix(in srgb, var(--accent) 15%, var(--elev));
}

#concursos .ea:hover {
  background: color-mix(in srgb, var(--accent) 14%, var(--elev));
}

#concursos .da:hover {
  background: color-mix(in srgb, #ca8a04 18%, var(--elev));
}

#concursos .na:hover {
  background: color-mix(in srgb, var(--accent) 22%, var(--elev));
}

#concursos .ca {
  padding: 0;
  margin: 0;
  font: 14px var(--font);
  color: var(--muted);
}

#concursos .ca a {
  padding: 9px 7px;
  font-weight: bold;
  text-decoration: none;
  color: var(--text);
  display: block;
}

#concursos .ca a:hover {
  text-decoration: underline;
}

#concursos .cb {
  float: left;
  width: 270px;
  padding: 0 5px;
  min-height: 50px;
}

#concursos .cc {
  float: left;
  width: 35px;
  padding: 0 5px;
  text-align: center;
  border-left: 1px solid var(--surface);
  border-right: 1px solid var(--surface);
  line-height: 48px;
  min-height: 52px;
  font-weight: bold;
  font-size: 12px;
  color: var(--accent);
}

#concursos .cd {
  float: left;
  width: 245px;
  padding: 0 5px 0 15px;
  min-height: 52px;
}

#concursos .ce {
  float: right;
  width: 110px;
  padding: 0 0 0 13px;
  border-left: 1px solid var(--surface);
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 13px;
  font-weight: bold;
  color: var(--muted);
}

#concursos .cd span {
  color: var(--accent);
}

#concursos .cd span span {
  color: var(--muted);
}

#concursos .ca img {
  padding: 0;
  width: 50px;
  height: auto;
  opacity: 0.85;
}

#load-more-wrap {
  text-align: center;
  margin: 24px 0;
}

#load-more-wrap button {
  border: 1px solid var(--accent);
  background: var(--surface);
  color: var(--accent);
  font: bold 14px var(--font);
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
}

#load-more-wrap button:hover {
  background: var(--accent);
  color: #fff;
}

html.app-detail-open #menu {
  display: none;
}

html.app-detail-open #cq-main-row {
  display: block;
}

html.app-detail-open #conteudo {
  width: 100%;
  max-width: none;
  border: none;
}

@media screen and (max-width: 980px) {
  #center {
    width: 100%;
  }

  #cq-main-row {
    flex-direction: column;
  }

  #menu {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  #menu ul {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
  }

  #menu ul li {
    flex: 1 1 50%;
    border-radius: 0;
  }
}

@media screen and (max-width: 768px) {
  #concursos .cb {
    width: 200px;
  }

  #concursos ul.ul_estados {
    --estados-gap: 3px;
  }

  #concursos ul.ul_estados li a {
    padding: 6px 4px;
    font-size: 12px;
  }
}

@media screen and (max-width: 570px) {
  .header-vagas-line {
    font-size: 0.78rem;
  }

  #concursos ul.ul_estados {
    --estados-gap: 2px;
  }

  #concursos ul.ul_estados li a {
    padding: 5px 2px;
    font-size: 11px;
  }

  #concursos .cb {
    width: 52px;
    padding-left: 5px;
  }

  #concursos .ca a {
    padding: 9px 7px 7px 9px;
  }

  #concursos .ca img {
    width: 35px;
  }

  #concursos .cc {
    width: 28px;
    padding: 0;
  }

  #concursos .cd {
    padding-left: 7px;
    width: min(200px, 38vw);
  }

  #concursos .ce {
    width: 88px;
    padding-left: 6px;
    font-size: 12px;
  }
}
