/* term-main.css */

/* Estilos generales */
#smile-glossary-container {
    width: 95%;
    max-width: 1000px;
    /* ancho por defecto hasta el primer breakpoint */
    margin: 0 auto;
    font-family: Arial, sans-serif;
    color: #1b1b1b;
}

@media (min-width: 992px) {
    #smile-glossary-container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    #smile-glossary-container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    #smile-glossary-container {
        max-width: 1320px;
    }
}

/* Franja con logos */
.glossary-header {
    background-color: #f0f0f0;
    padding: 10px;
    margin-bottom: 1rem;
    margin-top: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.logos-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-image {
    height: 64px !important;
    width: auto;
}

/* Franja de selección de idiomas */
.language-selection-bar {
    background-color: #f0f0f0;
    padding-top: 10px;
    padding-right: 10px;
    padding-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 1rem;
    margin-top: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.language-select {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-left: 10px;
    flex: 1 1 48%;
}

.language-select label {
    margin-right: 10px;
    font-weight: bold;
}

.language-label {
    margin-right: 10px;
    font-weight: bold;
}

.custom-select-wrapper {
    position: relative;
    display: inline-block;
    user-select: none;
    width: calc(100% - 60px);
    /* Ajuste para el botón de audio */
}

.custom-select {
    position: relative;
    display: inline-block;
    width: 100%;
}

.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #e0e0e0;
    padding: 10px;
    border: 1px solid #2458e5;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}

.flags-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.flag-icon-small {
    width: 20px;
    height: 15px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.arrow-down {
    font-size: 18px;
    margin-left: auto;
}

.custom-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #2458e5;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 999;
    display: none;
}

.custom-option {
    padding: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.custom-option:hover {
    background-color: #e0f2f1;
}

.custom-option .flag-icon {
    width: 20px;
    height: 15px;
    margin-right: 10px;
}

.custom-option.selected {
    background-color: #e0f2f1;
}

.custom-select.open .custom-options {
    display: block;
}

/* Estilos para el botón de audio principal */
.audio-button {
    margin-left: 10px;
    background-color: #e0e0e0;
    border: 1px solid #2458e5;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.audio-button img {
    width: 24px;
    height: 24px;
}

.audio-button:hover {
    background-color: #2458e5;
    color: #ffffff;
}



/* Bloque de búsqueda */
.search-bar {
    background-color: #f0f0f0;
    padding: 10px;
    margin-bottom: 1rem;
    margin-top: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.glossary-terms,
.glossary-categories {
    margin-bottom: 20px;
}

.glossary-terms h3,
.glossary-categories h3 {
    font-size: 24px;
    color: #2458e5;
    margin-bottom: 10px;
}

/* Buscador de términos */
.term-search {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.term-search input {
    font-size: 18px;
    padding: 10px;
    border: 1px solid #666666;
    border-radius: 5px;
    width: calc(100% - 10px);
}

.term-search button {
    margin-left: 10px;
    font-size: 18px;
    padding-left: 20px;
    padding-top: 10px;
    padding-bottom: 10px;
    background-color: #e0e0e0;
    border: 1px solid #2458e5;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.term-search button:hover {
    background-color: #2458e5;
    color: #ffffff;
}

/* Botones de letras */
.alphabet-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.alphabet-button {
    font-size: 16px;
    padding: 8px 12px;
    background-color: #2458e5;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.alphabet-button:hover {
    background-color: #003d66;
}

.alphabet-button.alphabet-button-disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    pointer-events: none;
}

/* Buscador de categorías */
.category-search input {
    font-size: 18px;
    padding: 10px;
    border: 1px solid #666666;
    border-radius: 5px;
    width: 100%;
    margin-bottom: 20px;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-item {
    display: flex;
    align-items: center;
}

.category-button {
    font-size: 16px;
    padding: 10px 20px;
    background-color: #e0e0e0;
    border: 1px solid #2458e5;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.category-button:hover {
    background-color: #2458e5;
    color: #ffffff;
}

.category-audio-button {
    margin-left: 5px;
    background-color: #e0e0e0;
    border: 1px solid #2458e5;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.category-audio-button img {
    width: 24px;
    height: 24px;
}

.category-audio-button:hover {
    background-color: #2458e5;
    color: #ffffff;
}


/* Resultados */
.glossary-results .term-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 20px;
}

.term-row .column {
    width: 100%;
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 1rem;
    margin-top: 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Ajustes para los botones de audio de términos y categorías dentro de los resultados */
.audio-button-term,
.audio-button-category {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #2458e5;
    border-radius: 5px;
    background-color: #e0e0e0;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-top: 5px;
}

.audio-button-term img,
.audio-button-category img {
    width: 24px;
    height: 24px;
}

.audio-button-term:hover,
.audio-button-category:hover {
    background-color: #2458e5;
    color: #ffffff;
}


.term-box h4 {
    font-size: 20px;
    color: #2458e5;
    margin-bottom: 10px;
}

.category-name {
    font-size: 16px;
    color: #333;
    margin-top: 5px;
}

/* Paginación */
.glossary-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.glossary-pagination button {
    font-size: 18px;
    padding: 10px 20px;
    background-color: #e0e0e0;
    border: 1px solid #2458e5;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.glossary-pagination button:hover {
    background-color: #2458e5;
    color: #ffffff;
}

.glossary-pagination span {
    margin: 0 10px;
    font-size: 18px;
    color: #2458e5;
}

/* Responsividad */
@media (min-width: 768px) {
    .language-select {
        flex: 1 1 48%;
        margin-bottom: 0;
    }

    .term-row {
        flex-wrap: nowrap;
    }

    .term-row .column {
        width: 48%;
    }
}

@media (max-width: 767px) {
    .language-select {
        flex: 1 1 100%;
        margin-bottom: 10px;
    }
}

/* Ajuste para el tamaño y color de la fuente en los resultados de la búsqueda */
.term-row .column {
    color: #01234b;
    font-size: 20px;
}

.term-row .column span,
.term-row .column button.category-button,
.term-row .column button.audio-button-term,
.term-row .column button.category-audio-button {
    color: #01234b;
    font-size: 20px;
}

/* Ajustes para el botón de búsqueda */
.search-button {
    background: none;

}

.search-button .dashicons-search {
    vertical-align: middle;
    font-size: 30px !important;
    margin-right: 20px;
    line-height: 20px;

}

.screen-reader-text {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* Oculta únicamente los botones de audio de la barra de selección de idiomas */
#smile-glossary-container .language-selection-bar .audio-button {
    display: none !important;
}