/* Legacy Search - Shared Styles */
/* Static styles - no longer uses dynamic CSS variables */

.legacy-wrap {
    font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 13px;
    color: #6a6c6f;
    background: #fff;
    border-left: 1px solid #e4e5e7;
    padding: 25px 40px 40px 40px;

    min-height: 100vh;
}

.legacy-topbar {
    background: #7c74b0;
    color: #fff;
    border-radius: 2px;
    border-bottom: 1px solid #ffffff;
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    box-shadow: none;
    margin-bottom: 0;
}

.legacy-search-panel {
    background: #f5f5f5;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    padding: 20px;
}

.legacy-facet {
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 25px;
}

.legacy-facet-head {
    background: #47418b;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    padding: 10px;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.legacy-facet-head:hover {
    background: #5a53a3;
}

.facet-chevron {
    transition: transform 0.2s ease;
    font-size: 10px;
}

.legacy-facet.collapsed .facet-chevron {
    transform: rotate(-90deg);
}

.legacy-facet-body {
    padding: 20px;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

#filtro-activo ul li {
    font-size: 17px;
    font-weight: 600;
}

.legacy-facet.collapsed .legacy-facet-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

.legacy-facet-list {
    max-height: 300px;
    overflow-y: auto;
}

.legacy-facet-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6a6c6f;
    text-decoration: none;
    border: 1px solid #e4e5e7;
    border-radius: 2px;
    padding: 8px 10px;
    margin-bottom: 7px;
    font-size: 14px;
}

.facet-item-count {
    background: #71a328;
    color: #fff;
    border-radius: 999px;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    padding: 0 6px;
}

.legacy-facet-item:hover,
.legacy-facet-item.active {
    background: #f7f9fa;
    border-color: #d9dbdd;
    color: #606265;
}

.alert.alert-info {
    text-align: justify;
}

.legacy-results-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.legacy-results-count {
    font-size: 13px;
    color: #30323a;
}

.legacy-letter-badge,
.legacy-origin-badge {
    background: #71a328;
    color: #fff;
    border-radius: 999px;
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.legacy-result-card {
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    padding: 20px;
    box-shadow: none;
}

.legacy-result-card--highlight {
    border-color: #71a328 !important;
    box-shadow: 0 0 0 3px rgba(113, 163, 40, 0.25), 0 6px 18px rgba(71, 65, 139, 0.18) !important;
}

.legacy-term {
    font-size: 21px;
    color: #47418b;
    margin-bottom: 8px;
    font-weight: 600;
}

.legacy-def {
    white-space: pre-line;
    text-align: justify;
}

.legacy-def strong,
.legacy-term strong {
    background-color: #71a328;
    color: #fff;
    border-radius: 2px;
    padding: 1px 2px;
}

.legacy-seccion-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 2px;
    font-weight: 600;
}

.legacy-footer {
    background: #668088;
    border-radius: 2px;
    color: #fff;
    padding: 16px;
}

.legacy-footer-logos {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.legacy-logo-image {
    max-width: 100%;
    max-height: 100px;
    width: auto;
    height: auto;
    display: block;
}

.legacy-logo-red {
    max-height: 80px;
}

.legacy-logo-rae,
.legacy-logo-dpej {
    max-height: 76px;
}

#boton_arriba {
    position: fixed;
    bottom: 30px;
    left: 40px;
    width: 50px;
    height: 50px;
    text-align: center;
    border-radius: 4px;
    background-color: #7c74b0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1000;
    transition: background-color .3s, opacity .5s, visibility .5s;
    text-decoration: none;
}

#boton_arriba::after {
    content: "\2191";
    font-size: 30px;
    line-height: 50px;
    color: #fff;
}

#boton_arriba:hover,
#boton_arriba:active {
    background-color: #7c74b0;
}

#boton_arriba.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#boton_arriba_desktop {
    display: none;
}

@media (min-width: 992px) {
    .view-totem #boton_arriba {
        display: none;
    }

    .view-totem #boton_arriba_desktop {
        display: block;
        width: 50px;
        height: 50px;
        margin: 0 auto;
        text-align: center;
        border-radius: 4px;
        background-color: #7c74b0;
        text-decoration: none;
        transition: background-color .3s;
    }

    .view-totem #boton_arriba_desktop::after {
        content: "\2191";
        font-size: 30px;
        line-height: 50px;
        color: #fff;
    }

    .view-totem #boton_arriba_desktop:hover,
    .view-totem #boton_arriba_desktop:active {
        background-color: #7c74b0;
    }
}

.legacy-wrap .btn-primary {
    background-color: #47418b !important;
    border-color: #000000 !important;
    color: #ffffff !important;
    min-height: 48px;
    font-size: 20px;
    line-height: 1;
    padding-top: 2px;
    padding-bottom: 2px;
}

.legacy-wrap .btn-primary:hover,
.legacy-wrap .btn-primary:focus {
    background-color: #5a53a3 !important;
    border-color: #000000 !important;
}

.legacy-wrap .btn-outline-secondary {
    background-color: #ffffff;
    border-color: #e4e5e7;
    color: #6a6c6f;
    min-height: 38px;
    font-size: 16px;
    line-height: 1;
    padding-top: 1px;
    padding-bottom: 1px;
}

.legacy-wrap .btn-outline-secondary:hover,
.legacy-wrap .btn-outline-secondary:focus {
    background-color: #ffffff;
    border-color: #d9dbdd;
    color: #606265;
}

.legacy-wrap .form-control,
.legacy-wrap .form-select {
    border-radius: 2px;
    font-size: 13px;
    min-height: 40px;
}

.legacy-action-btn {
    min-height: 34px !important;
    font-size: 13px !important;
    border-radius: 1px !important;
    padding: 6px 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px;
    text-align: center;
    font-weight: 600;
}

.legacy-action-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.2;
}

.filter-clear-btn {
    font-size: 2rem;
    line-height: 1;
    vertical-align: middle;
    margin-left: 4px;
}



/* Pagination */
.pagination {
    --bs-pagination-color: #47418b;
    --bs-pagination-bg: #fff;
    --bs-pagination-border-color: #d9d9d9;
    --bs-pagination-hover-color: #5a53a3;
    --bs-pagination-hover-bg: #f7f9fa;
    --bs-pagination-hover-border-color: #d9dbdd;
    --bs-pagination-focus-color: #5a53a3;
    --bs-pagination-focus-bg: #f7f9fa;
    --bs-pagination-focus-box-shadow: none;
    --bs-pagination-active-color: #fff;
    --bs-pagination-active-bg: #47418b;
    --bs-pagination-active-border-color: #47418b;
    --bs-pagination-disabled-color: #6a6c6f;
    --bs-pagination-disabled-bg: #fff;
    --bs-pagination-disabled-border-color: #e4e5e7;
    --bs-pagination-border-radius: 2px;
    --bs-pagination-font-size: 13px;
}

@media (min-width: 992px) {
    .legacy-wrap #filtros {
        position: sticky;
        top: calc(80px + 25px);
        align-self: flex-start;
        max-height: calc(100vh - 80px - 25px - 1rem);
        overflow-y: auto;
    }
}

@media (max-width: 991.98px) {
    .legacy-results-top,
    .legacy-footer-logos {
        flex-direction: column;
        align-items: flex-start;
    }

    .legacy-wrap {
        padding: 15px;
    }

    .legacy-wrap .btn-primary,
    .legacy-wrap .btn-outline-secondary {
        font-size: 16px;
    }
}
