.custom-select-wrapper {
    position: relative;
    display: inline-block;
}

.custom-select-wrapper::after {
    content: 'keyboard_arrow_down';
    font-family: 'Material Symbols Outlined';
    font-size: 1.5rem;
    color: #757575;
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    pointer-events: none;
    transition: color 0.2s, content 0.2s;
}

.custom-select-wrapper.open::after {
    content: 'keyboard_arrow_up';
    color: #1B7727;
}

.custom-select-wrapper .form-select {
    transition: border-color 0.2s;
}

.custom-select-wrapper .form-select:focus {
    border-color: #ccc !important;
    outline: none !important;
    box-shadow: none !important;
}

.custom-select-wrapper.open .form-select {
    border-color: #1B7727 !important;
}

/* Manter cor verde quando um valor foi selecionado */
.custom-select-wrapper.selected .form-select {
    border-color: #1B7727 !important;
}

.custom-select-wrapper.selected::after {
    color: #1B7727;
}
.organograma-list { border-radius: 1rem; border: 0.0625rem solid #C5C5C5; padding: 1.5rem; gap: 2rem; background: #FEFEFE; margin-top: 1.875rem; }

.custom-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.25rem; /* Space between accordion items */
}

/* removed empty rule: .custom-accordion .accordion-item */

.custom-accordion .accordion-title {
    display: flex;
    justify-content: flex-start; /* Changed */
    align-items: center;
    padding: 0.9375rem;
    cursor: pointer;
    font-weight: 500;
    border-radius: 0.25rem;
    background: #E9F6EB;
    border-bottom: 0.125rem solid transparent; /* To keep the height consistent */
    gap: 0.5rem; /* Added */
}

.custom-accordion .accordion-title:hover {
    background: linear-gradient(90deg, #EEEEEE 14.54%, #D9F2EF 99.65%);
}

.custom-accordion .accordion-title.active {
    background: #1B7727;
    color: #fff;
}

.custom-accordion .accordion-title .icon {
    width: 1.5rem; /* Set a width for the icon */
    height: 1.5rem; /* Set a height for the icon */
    background-repeat: no-repeat;
    background-position: center;
}

.custom-accordion .accordion-title .icon {
    background-image: url('../icon/mais.svg');
}

.custom-accordion .accordion-title.active .icon {
    background-image: url('../icon/menos.svg');
}

.custom-accordion .accordion-content {
    max-height: 0;
    overflow: hidden;
    background: #F9F9F9;
    border-radius: 0.25rem 0.25rem;
    padding: 0;
    transition: max-height 0.35s ease-out, padding 0.35s ease-out;
    margin-top: -0.25rem;
}

.custom-accordion .accordion-item > .accordion-title.active + .accordion-content {
    max-height: 62.5rem;
    padding-top: 1rem;
    padding-right: 1.5rem;
    padding-bottom: 2rem;
    padding-left: 1.5rem;
}

.custom-accordion .accordion-content ul {
    margin: 0;
    padding-left: 1.25rem;
}

.custom-accordion .accordion-content ul li {
    color: #465564; /* Corrected text color */
    margin: 0.45rem 0;
    padding-left: 0.25rem;
}

.custom-accordion .accordion-content ul li .cargo-item {
    display: block;
    font-family: Kanit;
    font-weight: 500;
    font-size: 1.125rem;
    line-height: 1.35;
    color: #465564;
    letter-spacing: 0;
}

.custom-accordion .accordion-content ul li .cargo-level-1 {
    display: block;
    margin-left: 0;
    padding-left: 0;
    font-weight: 300;
    font-size: 1rem;
}

.custom-accordion .accordion-content ul li.cargo-list-item-depth-1,
.custom-accordion .accordion-content ul li:has(.cargo-level-1) {
    margin-left: 1rem;
}

.custom-accordion .accordion-content ul li .cargo-item a {
    color: inherit;
    font: inherit;
    text-decoration: none;
}

.custom-accordion .accordion-content ul li .cargo-item a:hover {
    text-decoration: underline;
}

.custom-accordion .accordion-content ul li.multi-cell-list-item {
    list-style: none;
    margin: 0.75rem 0;
    padding-left: 0;
}

.multi-cell-dropdown {
    width: 100%;
}

.multi-cell-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    color: #1B7727;
    cursor: pointer;
    font-family: Kanit;
    font-weight: 500;
    font-style: normal;
    font-size: 1rem;
    line-height: 100%;
    letter-spacing: 0;
    text-align: left;
}

.multi-cell-icon {
    flex: 0 0 1.5rem;
    width: 1.5rem;
    min-width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1B7727;
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 1.5rem;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

.multi-cell-title {
    display: inline-block;
    min-width: 0;
}

.multi-cell-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-0.25rem);
    transition: max-height 0.35s ease, opacity 0.2s ease, transform 0.2s ease;
}

.multi-cell-toggle.active + .multi-cell-content {
    opacity: 1;
    transform: translateY(0);
}

.custom-accordion .accordion-content .multi-cell-content ul {
    margin: -0.25rem 0 0 2rem;
    padding-left: 1.25rem;
    list-style: disc;
}

.custom-accordion .accordion-content .multi-cell-content ul li {
    display: list-item;
    font-family: Kanit;
    font-weight: 300;
    font-style: normal;
    font-size: 1rem;
    line-height: 2rem;
    letter-spacing: 0;
    color: #465564;
    margin: 0rem 0;
    padding-left: 0rem;
}

.competencias-accordion {
    margin-top: 1rem;
}

.competencias-accordion .accordion-title.active {
    background: #465564;
    color: #FFFFFF;
    cursor: default;
}

.competencias-accordion .accordion-title.active .icon {
    filter: brightness(0) invert(1);
}

.competencias-accordion .competencias-content,
.competencias-accordion .competencias-content p,
.competencias-accordion .competencias-content li {
    font-family: Kanit;
    font-weight: 300;
    font-style: normal;
    font-size: 1rem;
    line-height: 2rem;
    letter-spacing: 0;
    color: #465564;
}

.competencias-accordion .competencias-content p {
    margin: 0 0 1rem;
}

.competencias-accordion .competencias-content p:last-child,
.competencias-accordion .competencias-content ul:last-child {
    margin-bottom: 0;
}

.competencias-accordion .competencias-content ul {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
}

.competencias-accordion .competencias-content strong,
.competencias-accordion .competencias-content b {
    font-weight: 600;
}

.competencias-accordion .competencias-content em,
.competencias-accordion .competencias-content i {
    font-style: italic;
}

.filter-instruction {
    font-family: Kanit;
    font-weight: 400;
    font-size: 1.25rem;
    line-height: 100%;
    color: #465564;
}

.filter-instruction-wrapper {
    height: 3.875rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.organograma-filter .container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.organograma-filter .form-label {
    font-family: Kanit;
    font-weight: 300;
    /* font-style: Light; */ /* This is not a standard CSS property, will be ignored */
    font-size: 1rem;
    /* leading-trim: NONE; */ /* This is not a standard CSS property, will be ignored */
    line-height: 132%;
    /* letter-spacing: 0%; */ /* 0% is default, can be omitted */
    color: #26323F;
}

/* removed empty rule: .filter-controls */

.form-group {
    display: flex;
    flex-direction: column;
}

.organograma-filter .form-select {
    height: 3.5rem;
    border-radius: 0.5rem;
    border: 0.125rem solid #C5C5C5;
    background: #FEFEFE;
    font-family: Kanit;
    font-weight: 300;
    font-size: 1rem;
    line-height: 132%;
    color: #757575;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.5rem;
}

.btn-consultar {
    /* width: 12.5625rem; Removed fixed width */
    height: 3.5625rem;
    border-radius: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: #1B7727 !important; /* Default state */
    color: #FEFEFE !important;; /* Changed */
    border: none;
    cursor: pointer;
}

.btn-consultar:disabled {
    background: #C5C5C5 !important;
    cursor: not-allowed;
}

.btn-consultar:hover:not(:disabled) {
    background: #239832!important;;
    color: #FEFEFE;
}

.btn-consultar:active:not(:disabled) {
    background: #155C1E!important;;
    color: #FEFEFE;
}

.btn-consultar:focus:not(:disabled) {
    background: #155C1E!important;;
    color: #FEFEFE;
    outline-offset: 0.25rem; /* For the 0.25rem distance */
}

.organograma-container.container {
    padding: 0 0;
    margin-top: 0.625rem;
}

.organograma-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setor-title {
    font-family: Kanit;
    font-weight: 300;
    font-size: 1rem;
    line-height: 132%;
    color: #26323F;
}

.informacoes {
    display: flex;
    align-items: center;
    gap: 1rem; /* Adjust as needed */
    margin-bottom: 2rem; /* Space between informacoes and organograma-results */
    justify-content: space-between; /* Aligns items to the ends of the container */
}

.informacoes .sigla {
    height: 1.5rem;
    border-radius: 0.5rem;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    background: #104617;
    color: #FEFEFE;
    font-family: Kanit;
    font-weight: 500;
    font-size: 1rem;
    line-height: 100%; /* Adjust for vertical centering if needed */
    display: flex; /* To center text vertically */
    align-items: center; /* To center text vertically */
    justify-content: center; /* To center text horizontally */
    width: fit-content; /* Use fit-content for width based on content */
}

.informacoes .orgao-title {
    font-family: Kanit;
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 100%;
    color: #26323F;
    margin: 0; /* Remove default margin from h2 */
}

.informacoes .download-button {
    width: 11.44rem; /* Fixed width */
    height: 2rem; /* Fixed height */
    border-radius: 0.25rem;
    border: 0.0625rem solid #1B7727;
    padding: 0.25rem;
    background: none;
    color: #1B7727;
    font-family: Kanit;
    font-weight: 400;
    font-size: 1rem;
    line-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    cursor: pointer;
    text-decoration: none;
}

.informacoes .download-button .material-symbols-outlined {
    font-size: 1rem;
    color: #1B7727;
}

.informacoes .info-text-group {
    display: flex;
    align-items: center;
    gap: .75rem; /* Space between sigla and title */
}

@media (max-width: 36rem) {
    .informacoes {
        align-items: center;
        flex-direction: row;
        gap: 0.5rem;
    }

    .informacoes .info-text-group {
        align-items: center;
        flex: 1 1 auto;
        min-width: 0;
        gap: 0.5rem;
    }

    .informacoes .sigla {
        flex: 0 0 auto;
        margin-top: 0.125rem;
    }

    .informacoes .orgao-title {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 1rem;
        line-height: 1.1;
    }

    .informacoes .download-button {
        flex: 0 0 auto;
        width: auto;
        min-width: 0;
        height: auto;
        min-height: 2rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
        line-height: 1.1;
        white-space: nowrap;
    }
}

/* Anti-FOUC styles */
.cegovbr-loading .organograma-container {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* ====== Alto Contraste ====== */
body.body-contraste .organograma-list {
    background: #000 !important;
    border: 1px solid #fff !important;
    color: #fff !important;
}

body.body-contraste .filter-instruction,
body.body-contraste .organograma-filter .form-label,
body.body-contraste .setor-title,
body.body-contraste .informacoes .orgao-title {
    color: #fff !important;
}

body.body-contraste .organograma-filter .form-select {
    background-color: #000 !important;
    border-color: #fff !important;
    color: #fff !important;
}

body.body-contraste .custom-select-wrapper::after {
    color: #fff !important;
}

body.body-contraste .btn-consultar {
    background-color: #fff !important;
    color: #000 !important;
    border: 1px solid #fff !important;
}

body.body-contraste .btn-consultar:disabled {
    background-color: #333 !important;
    color: #999 !important;
    border-color: #666 !important;
}

body.body-contraste .custom-accordion .accordion-title {
    background: #000 !important;
    border: 1px solid #fff !important;
    color: #fff !important;
}

body.body-contraste .custom-accordion .accordion-title:hover {
    background: #333 !important;
}

body.body-contraste .custom-accordion .accordion-title.active {
    background: #fff !important;
    color: #000 !important;
}

body.body-contraste .custom-accordion .accordion-content {
    background: #000 !important;
    border: 1px solid #fff !important;
    border-top: none !important;
    color: #fff !important;
}

body.body-contraste .custom-accordion .accordion-content ul li {
    color: #fff !important;
}

body.body-contraste .informacoes .sigla {
    background: #fff !important;
    color: #000 !important;
}

body.body-contraste .informacoes .download-button {
    background: #000 !important;
    border: 1px solid #fff !important;
    color: #fff !important;
}

body.body-contraste .informacoes .download-button .material-symbols-outlined {
    color: #fff !important;
}

body.body-contraste .custom-accordion .accordion-title .icon {
    filter: brightness(0) invert(1) !important;
}

body.body-contraste .custom-accordion .accordion-title.active .icon {
    filter: brightness(0) !important; /* Torna preto no fundo branco ativo */
}

