/* ===== VARIÁVEIS ===== */
:root {
    --expansive-sidebar-width-collapsed: 60px;
    --expansive-sidebar-width-expanded: 450px;
    --expansive-sidebar-bg: linear-gradient(135deg, var(--blueBase) 0%, var(--blueDark) 100%);
    --expansive-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --expansive-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --expansive-shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.2);
    --yellowBase: #F8DD4F;
    --yellowHover: #fae478;
    --blueBase: #00042C;
    --blueLight: #1a1f5c;
    --blueDark: #000322;
    --white: #ffffff;
}

/* ===== SIDEBAR PRINCIPAL ===== */
.expansive-sidebar {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--expansive-sidebar-width-collapsed);
    height: 100%;
    background: var(--expansive-sidebar-bg);
    border-right: 1px solid var(--yellowBase);
    z-index: 1050;
    transition: var(--expansive-transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--expansive-shadow);
    backdrop-filter: blur(10px);
    will-change: width;
    pointer-events: auto;
}

.expansive-sidebar.expanded {
    width: var(--expansive-sidebar-width-expanded);
    box-shadow: var(--expansive-shadow-hover);
}

/* ===== HEADER ===== */
.expansive-sidebar-header {
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--yellowBase);
    padding: 1rem;
    flex-shrink: 0;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    transition: var(--expansive-transition);
    position: relative;
    overflow: hidden;
}

.expansive-sidebar-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(248, 221, 79, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.expansive-sidebar-header:hover::before {
    left: 100%;
}

.expansive-sidebar-header:hover {
    background: rgba(248, 221, 79, 0.1);
    transform: translateX(2px);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
    position: relative;
    z-index: 2;
}

.header-icon {
    color: var(--yellowBase);
    font-size: 1.2rem;
    min-width: 24px;
    text-align: center;
    transition: var(--expansive-transition);
}

.expansive-sidebar.expanded .header-icon {
    transform: rotate(180deg);
}

.header-text {
    font-weight: 700;
    font-size: 1.1rem;
    opacity: 0;
    transition: var(--expansive-transition);
    white-space: nowrap;
    flex: 1;
}

.expansive-sidebar.expanded .header-text {
    opacity: 1;
    animation: slideInFromLeft 0.4s ease-out;
}

.header-close {
    color: var(--yellowBase);
    font-size: 1.2rem;
    opacity: 0;
    transition: var(--expansive-transition);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    min-width: 24px;
    text-align: center;
}

.header-close:hover {
    background: rgba(248, 221, 79, 0.2);
    color: var(--white);
    transform: scale(1.1);
}

.expansive-sidebar.expanded .header-close {
    opacity: 1;
    animation: fadeIn 0.4s ease-out 0.2s both;
}

.header-divider {
    border: none;
    border-top: 1px solid rgba(248, 221, 79, 0.3);
    margin: 0.5rem 0 0 0;
    opacity: 0;
    transition: var(--expansive-transition);
}

.expansive-sidebar.expanded .header-divider {
    opacity: 1;
    animation: expandWidth 0.4s ease-out 0.1s both;
}

/* ===== BODY ===== */
.expansive-sidebar-body {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--yellowBase) rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1051;
}

.expansive-sidebar-body::-webkit-scrollbar {
    width: 6px;
}

.expansive-sidebar-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    margin: 8px 0;
}

.expansive-sidebar-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--yellowBase) 0%, var(--yellowHover) 100%);
    border-radius: 3px;
    border: 1px solid rgba(0, 4, 44, 0.2);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.expansive-sidebar-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--yellowHover) 0%, var(--yellowBase) 100%);
    box-shadow: 0 0 6px rgba(248, 221, 79, 0.4);
}

/* ===== SEÇÕES ===== */
.sidebar-section {
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-toggle {
    display: flex;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    transition: var(--expansive-transition);
    position: relative;
    gap: 0.75rem;
    min-height: 60px;
    overflow: hidden;
    will-change: transform;
}

.section-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(248, 221, 79, 0.1), transparent);
    transition: left 0.5s ease;
}

.section-toggle:hover::before {
    left: 100%;
}

.section-toggle:hover {
    background: rgba(248, 221, 79, 0.1);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(248, 221, 79, 0.2);
}

.section-toggle i {
    color: var(--yellowBase);
    font-size: 1.1rem;
    min-width: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.section-toggle:hover i {
    transform: scale(1.1);
    color: var(--yellowHover);
}

.section-text {
    color: var(--white);
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0;
    transition: var(--expansive-transition);
    white-space: nowrap;
    flex: 1;
}

.expansive-sidebar.expanded .section-text {
    opacity: 1;
    animation: slideInFromLeft 0.3s ease-out;
}

.toggle-icon {
    color: var(--yellowBase);
    font-size: 0.8rem;
    opacity: 0;
    transition: var(--expansive-transition);
    margin-left: auto;
}

.expansive-sidebar.expanded .toggle-icon {
    opacity: 1;
    animation: fadeIn 0.3s ease-out 0.1s both;
}

.sidebar-section.active .toggle-icon {
    transform: rotate(180deg);
    color: var(--yellowHover);
}

.sidebar-section.active>.section-toggle {
    background: linear-gradient(135deg, rgba(248, 221, 79, 0.2), rgba(248, 221, 79, 0.1));
    border-left: 3px solid var(--yellowBase);
    box-shadow: 0 2px 8px rgba(248, 221, 79, 0.3);
}

/* ===== CONTEÚDO DAS SEÇÕES ===== */
.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.2);
    padding: 0;
}

.sidebar-section.active .section-content {
    max-height: none;
    height: auto;
    animation: expandHeight 0.4s ease-out;
    padding: 0.5rem 0;
}

.expansive-sidebar:not(.expanded) .section-content {
    max-height: 0 !important;
}

/* ===== DIVISORES ===== */
.section-divider {
    border: none;
    border-top: 1px solid rgba(248, 221, 79, 0.2);
    margin: 0;
    opacity: 0;
    transition: var(--expansive-transition);
}

.expansive-sidebar.expanded .section-divider {
    opacity: 1;
    animation: fadeIn 0.3s ease-out 0.2s both;
}

/* ===== CAMADAS ATIVAS ===== */
.active-layer-count {
    background: var(--yellowBase);
    color: var(--blueDark);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    min-width: 24px;
    text-align: center;
    margin-left: auto;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(248, 221, 79, 0.3);
}

.active-layer-count:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(248, 221, 79, 0.4);
}

.active-layers-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    margin-top: 0.5rem;
}

.sidebar-section.active .active-layers-list {
    max-height: 400px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(248, 221, 79, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.5rem;
}

.no-active-layers {
    padding: 2rem 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.no-active-layers i {
    font-size: 2.5rem;
    color: var(--yellowBase);
    opacity: 0.3;
    margin-bottom: 0.75rem;
    display: block;
    animation: pulse 2s infinite;
}

.active-layer-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
    margin-left: 0.4rem;
    border-radius: 8px;
    animation: slideInFromLeft 0.3s ease-out;
}

.active-layer-item:hover {
    background: rgba(248, 221, 79, 0.15);
    border-left-color: var(--yellowBase);
    transform: translateX(4px);
}

.active-layer-info {
    flex: 1;
    min-width: 0;
}

.active-layer-name {
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.active-layer-path {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.layer-visibility-toggle {
    width: 32px;
    height: 18px;
    background: #cbd5e0;
    border-radius: 9px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
    border: none;
    outline: none;
}

.layer-visibility-toggle.active {
    background: var(--yellowBase);
}

.layer-visibility-toggle::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--white);
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.layer-visibility-toggle.active::after {
    transform: translateX(14px);
    background: var(--blueDark);
}

.btn-remove-layers {
    background: var(--yellowBase);
    color: var(--blueDark);
    border: none;
    border-radius: 8px;
    padding: 0.2rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(248, 221, 79, 0.2);
}



/* ===== PESQUISA DE CAMADAS ===== */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(248, 221, 79, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    margin: 1rem;
}

.search-input-wrapper:focus-within {
    border-color: var(--yellowBase);
    box-shadow: 0 0 15px rgba(248, 221, 79, 0.3);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.layer-search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.75rem 3rem 0.75rem 1rem;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    width: 100%;
}

.layer-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.search-icon-main {
    position: absolute;
    right: 0.75rem;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    opacity: 1;
}

.search-icon-main.fa-times {
    pointer-events: auto;
    cursor: pointer;
    color: var(--white);
    opacity: 0.8;
}

.search-icon-main.fa-times:hover {
    opacity: 1;
    transform: scale(1.1);
}

.search-results {
    margin-top: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(248, 221, 79, 0.2);
    max-height: 300px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    display: none;
    margin: 0 1rem 1rem 1rem;
    position: relative;
}

.search-results-header {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(248, 221, 79, 0.2);
    background: rgba(248, 221, 79, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}

.results-count {
    color: var(--yellowBase);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    display: block;
}

.search-results-list {
    padding: 0.25rem 0;
    max-height: 240px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--yellowBase) rgba(255, 255, 255, 0.1);
}

.search-results-list::-webkit-scrollbar {
    width: 6px;
}

.search-results-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    margin: 4px 0;
}

.search-results-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--yellowBase) 0%, var(--yellowHover) 100%);
    border-radius: 3px;
    border: 1px solid rgba(0, 4, 44, 0.2);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.search-results-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--yellowHover) 0%, var(--yellowBase) 100%);
    box-shadow: 0 0 6px rgba(248, 221, 79, 0.4);
}

.search-result-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.search-result-item:hover {
    background: rgba(248, 221, 79, 0.15);
    border-left-color: var(--yellowBase);
    box-shadow: 2px 0 8px rgba(248, 221, 79, 0.2);
}

.search-result-item.active {
    background: rgba(248, 221, 79, 0.1);
    border-left-color: var(--yellowBase);
}

.search-result-icon {
    color: var(--yellowBase);
    font-size: 0.9rem;
    opacity: 0.8;
    min-width: 20px;
    flex-shrink: 0;
    text-align: center;
}

.search-result-text {
    flex: 1;
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 0;
}

.search-result-path {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-highlight {
    background: rgba(248, 221, 79, 0.3);
    color: var(--yellowBase);
    font-weight: 600;
    padding: 0 2px;
    border-radius: 2px;
}

/* ===== CHECKBOXES ===== */
.checkbox-wrapper-20 {
    --slider-height: 20px;
    --slider-width: 40px;
    --switch-size: 16px;
    --switch-shift: 2px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --switch-on-color: var(--blueDark);
    --slider-on-color: var(--yellowBase);
    --switch-off-color: var(--white);
    --slider-off-color: #cbd5e0;
}

.checkbox-wrapper-20 .switch {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    min-height: 40px;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.3rem;
}

.checkbox-wrapper-20 .switch::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(248, 221, 79, 0.1), transparent);
    transition: left 0.3s ease;
}

.checkbox-wrapper-20 .switch:hover::before {
    left: 100%;
}

.checkbox-wrapper-20 .switch:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.search-result-item .checkbox-wrapper-20 .switch::before {
    display: none;
}

.search-result-item .checkbox-wrapper-20 .switch:hover::before {
    display: none;
}

.search-result-item .checkbox-wrapper-20 .switch:hover {
    background: transparent;
    transform: none;
}

.checkbox-wrapper-20 .switch .input {
    display: none;
}

.checkbox-wrapper-20 .switch .slider {
    position: relative;
    display: inline-block;
    width: var(--slider-width);
    height: var(--slider-height);
    background: var(--slider-off-color);
    border-radius: calc(var(--slider-height) / 2);
    cursor: pointer;
    transition: var(--transition);
    vertical-align: middle;
    min-width: var(--slider-width);
    min-height: var(--slider-height);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.checkbox-wrapper-20 .switch .slider:after {
    content: '';
    position: absolute;
    top: var(--switch-shift);
    left: var(--switch-shift);
    width: var(--switch-size);
    height: var(--switch-size);
    background: var(--switch-off-color);
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.checkbox-wrapper-20 .switch .input:checked+.slider {
    background: var(--slider-on-color);
    box-shadow: 0 0 10px rgba(248, 221, 79, 0.3);
}

.checkbox-wrapper-20 .switch .input:checked+.slider:after {
    left: calc(100% - var(--switch-size) - var(--switch-shift));
    background: var(--switch-on-color);
}

.checkbox-wrapper-20 .switch label.ms-2 {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--white);
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1;
}

.checkbox-wrapper-20 .switch:hover label.ms-2 {
    color: var(--yellowHover);
}

/* ===== MAPA BASE ===== */
.basemap-option {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.basemap-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(248, 221, 79, 0.1), transparent);
    transition: left 0.3s ease;
}

.basemap-option:hover::before {
    left: 100%;
}

.basemap-option:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(4px);
}

.basemap-option input[type="radio"] {
    accent-color: var(--yellowBase);
    transition: all 0.3s ease;
}

.basemap-option label {
    color: var(--white);
    font-size: 0.9rem;
    cursor: pointer;
    flex: 1;
    font-weight: 500;
    transition: color 0.3s ease;
}

.basemap-option:hover label {
    color: var(--yellowHover);
}

.mapbase-section {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: transparent;
}

.mapbase-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.base-icon {
    color: var(--yellowBase);
    font-size: 1.2rem;
    min-width: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.mapbase-text {
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
    opacity: 0;
    transition: var(--expansive-transition);
    white-space: nowrap;
}

.expansive-sidebar.expanded .mapbase-text {
    opacity: 1;
    animation: slideInFromLeft 0.3s ease-out;
}

.expansive-sidebar:not(.expanded) .mapbase-text {
    display: none;
}

.expansive-sidebar:not(.expanded) .basemap-options {
    display: none;
}


/* ===== LISTA DE CAMADAS ===== */
.layer-list {
    padding: 1rem;
}

/* ===== FOOTER ===== */
.expansive-sidebar-footer {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--yellowBase);
    padding: 1rem;
    flex-shrink: 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--expansive-transition);
    position: relative;
    overflow: hidden;
}

.expansive-sidebar-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(248, 221, 79, 0.1), transparent);
    transition: left 0.5s ease;
}

.expansive-sidebar-footer:hover::before {
    left: 100%;
}

.expansive-sidebar-footer:hover {
    background: rgba(248, 221, 79, 0.1);
    transform: translateX(2px);
}

.footer-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
    width: 100%;
    transition: var(--expansive-transition);
    position: relative;
    z-index: 2;
}

.footer-content:hover {
    color: var(--yellowBase);
}

.footer-content i {
    color: var(--yellowBase);
    font-size: 1.1rem;
    min-width: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.footer-content:hover i {
    transform: scale(1.1);
}

.footer-text {
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0;
    transition: var(--expansive-transition);
    white-space: nowrap;
}

.expansive-sidebar.expanded .footer-text {
    opacity: 1;
    animation: slideInFromLeft 0.3s ease-out 0.1s both;
}

/* ===== OVERLAY ===== */
.expansive-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--expansive-transition);
    backdrop-filter: blur(2px);
}

.expansive-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== ÍCONES BASE ===== */
.base-icon {
    color: var(--yellowBase);
    font-size: 1rem;
    transition: all 0.3s ease;
    min-width: 24px;
    text-align: center;
}

.base-icon:hover {
    transform: scale(1.1);
    color: var(--yellowHover);
}

/* ===== ÍCONES ESPECÍFICOS ===== */
/* Header Icon */
.header-icon {
    font-size: 1.2rem;
    transition: var(--expansive-transition);
}

.expansive-sidebar.expanded .header-icon {
    transform: rotate(180deg);
}

/* Header Close Icon */
.header-close {
    font-size: 1.2rem;
    opacity: 0;
    transition: var(--expansive-transition);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
}

.header-close:hover {
    background: rgba(248, 221, 79, 0.2);
    color: var(--white);
    transform: scale(1.1);
}

.expansive-sidebar.expanded .header-close {
    opacity: 1;
    animation: fadeIn 0.4s ease-out 0.2s both;
}

/* Section Toggle Icons */
.section-toggle i {
    font-size: 1.1rem;
}

/* Footer Icon */
.footer-content i {
    font-size: 1.1rem;
}

/* Toggle Icon */
.toggle-icon {
    font-size: 0.8rem;
    opacity: 0;
    transition: var(--expansive-transition);
    margin-left: auto;
}

.expansive-sidebar.expanded .toggle-icon {
    opacity: 1;
    animation: fadeIn 0.3s ease-out 0.1s both;
}

.sidebar-section.active .toggle-icon {
    transform: rotate(180deg);
    color: var(--yellowHover);
}

/* Search Icons */
.search-icon-main {
    position: absolute;
    right: 0.75rem;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    opacity: 1;
}

.search-icon-main.fa-times {
    pointer-events: auto;
    cursor: pointer;
    color: var(--white);
    opacity: 0.8;
}

.search-icon-main.fa-times:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Search Result Icon */
.search-result-icon {
    font-size: 0.9rem;
    opacity: 0.8;
    min-width: 20px;
    flex-shrink: 0;
}

/* Action Icons (Download e Metadados) */
.action-icon {
    color: var(--white);
    font-size: 1rem;
    transition: all 0.3s ease;
    padding: 0.4rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-left: 0.3rem;
    background: rgba(255, 255, 255, 0.1);
    min-width: 34px;
    min-height: 34px;
    transform: scale(1);
}

.action-icon:hover {
    color: var(--yellowBase);
    transform: scale(1.15);
    background: rgba(248, 221, 79, 0.2);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(248, 221, 79, 0.3);
}

/* Aplicar classes específicas para os ícones */
.download,
.matadadosLink {
    color: var(--white) !important;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.2rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-left: 0.1rem;
    min-width: 34px;
    min-height: 34px;
    transform: scale(1);
}

.download:hover,
.matadadosLink:hover {
    color: var(--yellowBase) !important;
    transform: scale(1.15);
    background: rgba(248, 221, 79, 0.2);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(248, 221, 79, 0.3);
}

.download-icon,
.metadados-icon {
    font-size: 1rem;
    transition: inherit;
}


.search-address-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--yellowBase);
    font-size: 1rem;
    cursor: pointer;
    z-index: 2;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}
.search-address-btn:hover {
    background: rgba(248, 221, 79, 0.15);
    color: var(--yellowHover);
}
/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .expansive-sidebar {

        position: absolute;
        top: 0;
        left: 0;
        width: var(--expansive-sidebar-width-collapsed);
        height: 100%;
    }

    .expansive-sidebar.expanded {
        width: var(--expansive-sidebar-width-expanded);
    }

    #map {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .expansive-sidebar {

        width: var(--expansive-sidebar-width-collapsed);
    }

    .expansive-sidebar.expanded {

        width: 320px;
    }

    .checkbox-wrapper-20 .switch label.ms-2 {
        font-size: 0.8rem;
        line-height: 1.2;
    }
}

.expansive-sidebar.loading {
    pointer-events: none;
    opacity: 0.7;
}

.expansive-sidebar.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    border: 3px solid rgba(248, 221, 79, 0.3);
    border-radius: 50%;
    border-top-color: var(--yellowBase);
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ===== ANIMAÇÕES ===== */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes expandWidth {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes expandHeight {
    from {
        max-height: 0;
    }

    to {
        max-height: 500px;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

/* ===== UTILIDADES ===== */
.expansive-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.expansive-slide-in {
    animation: slideInFromLeft 0.3s ease-out;
}

.expansive-pulse {
    animation: pulse 2s infinite;
}

.layer-manager-slide-in {
    animation: slideInFromLeft 0.3s ease-out;
}

.d-none {
    display: none !important;
}

.d-sm-inline {
    display: inline !important;
}

@media (max-width: 576px) {
    .d-sm-inline {
        display: none !important;
    }
}

/* ===== SEÇÃO DE PESQUISA DIRETA ===== */
.search-section {
    padding: 0rem 1rem;
    transition: var(--expansive-transition);
    position: relative;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    overflow: hidden;
}

.expansive-sidebar:not(.expanded) .search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(248, 221, 79, 0.1), transparent);
    transition: left 0.5s ease;
}

.expansive-sidebar:not(.expanded) .search-section:hover::before {
    left: 100%;
}

.expansive-sidebar:not(.expanded) .search-section:hover {
    background: rgba(248, 221, 79, 0.1);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(248, 221, 79, 0.2);
}

.expansive-sidebar:not(.expanded) .search-section {
    padding: 0rem 1rem;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.expansive-sidebar:not(.expanded) .search-section .search-input-wrapper {
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    min-width: 24px;
    text-align: center;
}

.expansive-sidebar:not(.expanded) .search-section .search-input-wrapper:hover {
    background: transparent;
    border: none;
    transform: none;
}

.expansive-sidebar:not(.expanded) .search-section .layer-search-input {
    display: none;
}

.expansive-sidebar:not(.expanded) .search-section .search-icon-main {
    position: static;
    color: var(--yellowBase);
    font-size: 1.1rem;
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s ease;
}

.expansive-sidebar:not(.expanded) .search-section:hover .search-icon-main {
    transform: scale(1.1);
    color: var(--yellowHover);
}

.expansive-sidebar:not(.expanded) .search-section .search-results {
    display: none !important;
}

.expansive-sidebar.expanded .search-section {
    cursor: default;
}

.expansive-sidebar.expanded .search-section::before {
    display: none;
}

.expansive-sidebar.expanded .search-section:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}

.expansive-sidebar.expanded .search-section .search-input-wrapper {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(248, 221, 79, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    position: relative;
    display: flex;
    align-items: center;
    height: auto;
    min-height: 44px;
}

.expansive-sidebar.expanded .search-section .search-input-wrapper:focus-within {
    border-color: var(--yellowBase);
    box-shadow: 0 0 15px rgba(248, 221, 79, 0.3);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.expansive-sidebar.expanded .search-section .layer-search-input {
    display: block;
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.75rem 3rem 0.75rem 1rem;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    width: 100%;
}

.expansive-sidebar.expanded .search-section .layer-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.expansive-sidebar.expanded .search-section .search-icon-main {
    position: absolute;
    right: 0.75rem;
    color: var(--yellowBase);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    opacity: 1;
}

.expansive-sidebar.expanded .search-section .search-icon-main.fa-times {
    pointer-events: auto;
    cursor: pointer;
    color: var(--white);
    opacity: 0.8;
}

.expansive-sidebar.expanded .search-section .search-icon-main.fa-times:hover {
    color: var(--yellowBase);
    opacity: 1;
    transform: scale(1.1);
}

.expansive-sidebar.expanded .search-section .search-results {
    margin-top: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(248, 221, 79, 0.2);
    max-height: 300px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    display: none;
    width: 100%;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {

    .expansive-sidebar {
        position: absolute;
        top: 0;
        left: 0;
        width: var(--expansive-sidebar-width-collapsed);
        height: 100%;
    }
}

@media (max-width: 480px) {
    .expansive-sidebar {
       
        width: var(--expansive-sidebar-width-collapsed);
    }

    .expansive-sidebar.expanded {
        width: 320px;
    }

    .checkbox-wrapper-20 .switch label.ms-2 {
        font-size: 0.8rem;
        line-height: 1.2;
    }
}

.expansive-sidebar.loading {
    pointer-events: none;
    opacity: 0.7;
}

.expansive-sidebar.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    border: 3px solid rgba(248, 221, 79, 0.3);
    border-radius: 50%;
    border-top-color: var(--yellowBase);
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ===== ANIMAÇÕES ===== */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes expandWidth {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes expandHeight {
    from {
        max-height: 0;
    }

    to {
        max-height: 500px;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

/* ===== UTILIDADES ===== */
.expansive-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.expansive-slide-in {
    animation: slideInFromLeft 0.3s ease-out;
}

.expansive-pulse {
    animation: pulse 2s infinite;
}

.layer-manager-slide-in {
    animation: slideInFromLeft 0.3s ease-out;
}

.d-none {
    display: none !important;
}

.d-sm-inline {
    display: inline !important;
}

@media (max-width: 576px) {
    .d-sm-inline {
        display: none !important;
    }
}

/* ===== SEÇÃO DE PESQUISA DIRETA ===== */
.search-section {
    padding: 0rem 1rem;
    transition: var(--expansive-transition);
    position: relative;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    overflow: hidden;
}

.expansive-sidebar:not(.expanded) .search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(248, 221, 79, 0.1), transparent);
    transition: left 0.5s ease;
}

.expansive-sidebar:not(.expanded) .search-section:hover::before {
    left: 100%;
}

.expansive-sidebar:not(.expanded) .search-section:hover {
    background: rgba(248, 221, 79, 0.1);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(248, 221, 79, 0.2);
}

.expansive-sidebar:not(.expanded) .search-section {
    padding: 0rem 1rem;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.expansive-sidebar:not(.expanded) .search-section .search-input-wrapper {
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    min-width: 24px;
    text-align: center;
}

.expansive-sidebar:not(.expanded) .search-section .search-input-wrapper:hover {
    background: transparent;
    border: none;
    transform: none;
}

.expansive-sidebar:not(.expanded) .search-section .layer-search-input {
    display: none;
}

.expansive-sidebar:not(.expanded) .search-section .search-icon-main {
    position: static;
    color: var(--yellowBase);
    font-size: 1.1rem;
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s ease;
}

.expansive-sidebar:not(.expanded) .search-section:hover .search-icon-main {
    transform: scale(1.1);
    color: var(--yellowHover);
}

.expansive-sidebar:not(.expanded) .search-section .search-results {
    display: none !important;
}

.expansive-sidebar.expanded .search-section {
    cursor: default;
}

.expansive-sidebar.expanded .search-section::before {
    display: none;
}

.expansive-sidebar.expanded .search-section:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}

.expansive-sidebar.expanded .search-section .search-input-wrapper {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(248, 221, 79, 0.3);
    border-radius: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    position: relative;
    display: flex;
    align-items: center;
    height: auto;
    min-height: 44px;
}

.expansive-sidebar.expanded .search-section .search-input-wrapper:focus-within {
    border-color: var(--yellowBase);
    box-shadow: 0 0 15px rgba(248, 221, 79, 0.3);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.expansive-sidebar.expanded .search-section .layer-search-input {
    display: block;
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.75rem 3rem 0.75rem 1rem;
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    width: 100%;
}

.expansive-sidebar.expanded .search-section .layer-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.expansive-sidebar.expanded .search-section .search-icon-main {
    position: absolute;
    right: 0.75rem;
    color: var(--yellowBase);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    opacity: 1;
}

.expansive-sidebar.expanded .search-section .search-icon-main.fa-times {
    pointer-events: auto;
    cursor: pointer;
    color: var(--white);
    opacity: 0.8;
}

.expansive-sidebar.expanded .search-section .search-icon-main.fa-times:hover {
    color: var(--yellowBase);
    opacity: 1;
    transform: scale(1.1);
}

.expansive-sidebar.expanded .search-section .search-results {
    margin-top: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(248, 221, 79, 0.2);
    max-height: 300px;
    overflow-y: auto;
    backdrop-filter: blur(10px);
    display: none;
    width: 100%;
}

.map-base-group,
.map-base-group label,
.map-base-group .btn {
    background-color: #00042C;
    border: 1px solid var(--yellowBase);
    border-radius: 20px;
    color: var(--white);
}

.map-base-group label:hover {
    background-color: var(--yellowBase);
    color: #00042C;
}

.map-base-group input[type="radio"] {
    background-color: #F8DD4F;
}

.map-base-group label:has(input[type="radio"]:checked),
.map-base-group label.active {
    background-color: var(--yellowBase);
    color: #00042C;
}

.map-base-group input {
    display: none;
}


.test-icon {
    color: var(--yellowBase);
    font-size: 1.1rem;
    min-width: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.expansive-sidebar:not(.expanded) .search-section .search-address-btn {
    position: static;
    right: auto;
    background: none;
    border: none;
    color: var(--yellowBase);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 2;
    padding: 0;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    min-height: 24px;
}

.expansive-sidebar:not(.expanded) .search-section .search-address-btn:hover {
    background: transparent;
    color: var(--yellowHover);
    transform: scale(1.1);
}