/* Override select2 library defaults scoped to the sewage sludge interest form. */
.webform-submission-sewage-sludge-interest-reg-form .select2-container .select2-selection--single {
  box-sizing: border-box !important;
  height: 48px !important;
  border-radius: 10px !important;
  border: 1px solid #8b9196 !important;
}
.webform-submission-sewage-sludge-interest-reg-form .select2-container .select2-selection--single .select2-selection__rendered {
  line-height: 46px !important;
}
.webform-submission-sewage-sludge-interest-reg-form .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 46px !important;
}

/* Fix: double arrow icon on .coh-style-webform select fields.
 * The "Webform" Site Studio custom style (b45a7c78) defines two icon sources simultaneously:
 *   1. select { background-image: url(select-arrow-blue.svg) } — SVG arrow in select background
 *   2. label:after { content: "\f078"; position:absolute } — icomoon chevron overlay
 * Both appear at the same time → 2 visible icons.
 * The theme CSS (sanepar-stylesheet.min.css) loads after this file, so !important is required.
 * Additionally, label:before (blue backdrop for the chevron) lacks position:absolute and has
 * top:0 in the theme CSS — overriding to bottom:0 so it aligns with the chevron. */
.coh-style-webform .form-type-select select {
  background-image: none !important;
}
.coh-style-webform .form-type-select {
  position: relative;
}
.coh-style-webform .form-type-select label:before {
  display: none !important;
}

/* Fix: asterisk (*) displacement on required select field labels.
 * The Site Studio theme rule (.coh-style-webform .form-type-select label:after)
 * applies position:absolute, bottom/right:0, width/height:3.125rem and font-family:icomoon
 * to render the dropdown arrow icon. The base rule (form .form-type-select label.form-required:after)
 * overrides content:"*" and color, but does not reset those positioning properties,
 * causing the asterisk to render off-screen at the bottom-right corner. */
form .form-type-select label.form-required::after {
  position: static;
  bottom: auto;
  right: auto;
  width: auto;
  height: auto;
  display: inline;
  font-family: inherit;
}

.views-empty-notice {
  padding: 16px 20px;
  margin: 16px 0;
  background-color: #FFF3CD;
  border: 1px solid #FFECB5;
  border-radius: 8px;
  color: #664D03;
  text-align: center;
}

.views-empty-notice p {
  margin: 0;
}

/* "Limpar filtro" button injected next to the exposed form's "Aplicar" submit
 * button on the transparência site (see sanepar_form_views_exposed_form_alter()).
 * Mirrors the filled style and asymmetric pill radius of the adjacent submit
 * button defined by the Site Studio exposed-form component. */
.sanepar-transparencia-exposed .form-actions .sanepar-clear-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: -moz-fit-content;
  width: fit-content;
  min-width: 8.75rem;
  min-height: 3rem;
  padding: 0 1rem;
  background-color: var(--ssa-color-palette-text-blue-title, rgba(8, 98, 173, 1));
  color: var(--ssa-color-palette-action-default-text, #fff);
  border: none;
  border-radius: 0 1.5rem 0 1.5rem;
  font-family: var(--ssa-font-stacks-ubuntu-bold, "Ubuntu Bold", sans-serif);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}

.sanepar-transparencia-exposed .form-actions .sanepar-clear-filter:hover,
.sanepar-transparencia-exposed .form-actions .sanepar-clear-filter:focus {
  background-color: rgb(240, 247, 255);
  color: var(--ssa-color-palette-text-blue-title, rgba(8, 98, 173, 1));
  text-decoration: none;
}

@media (max-width: 768px) {
  /* Esconde as tabelas originais no mobile (somente as que foram processadas) */
  table[data-mt-processed="1"] {
    display: none !important;
  }

  .mt-cards {
    display: grid;
    gap: 1rem;
  }

  .mt-card {
    min-width: 280px;
    border: 1px solid #CBD5E1;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
  }

  .mt-card__header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 11.5px 16px;
    background: #E1EFFD;
    border: 0;
    text-align: left;
    list-style: none;
  }

  .mt-card__header::-webkit-details-marker {
    display: none;
  }

  .mt-card__title {
    font-weight: 700 !important;
    font-size: 18px;
    /* line-height: 1.2; */
    color: #0862AD;
    font-weight: 700;
  }

  .mt-card__chev {
    width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #0b5ea8;
  }

  .mt-card__chev svg {
    width: 15px;
    /* height: 18px; */
    transition: transform .2s ease;
  }

  .mt-card[open] .mt-card__chev svg {
    transform: rotate(180deg);
  }

  .mt-card__body {
    padding: 1rem 1rem 1.25rem;
  }

  .mt-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(120px, 2fr);
    gap: 0.5rem 1rem;
    padding: 1rem 0;
  }

  .mt-row:first-child {
    border-top: 0;
    padding-top: 0;
  }

  .mt-label {
    font-weight: 700;
    color: #020617;
    font-size: 14px;
  }

  .mt-value {
    color: #020617;
    word-break: break-word;
    font-weight: 400;
    font-size: 14px;
  }

  .mt-value a {
    color: #0b5ea8;
    text-decoration: underline;
  }
}