.spinner {
    position: relative;
    width: 22.4px;
    height: 22.4px;
    margin-top: 40px;
    margin-bottom: 25px;
}

.spinner::before,
.spinner::after {
    content: '';
    width: 100%;
    height: 100%;
    display: block;
    animation: spinner-b4c8mmmd 0.5s backwards, spinner-49opz7md 1.25s 0.5s infinite ease;
    border: 5.6px solid #156e9c;
    border-radius: 50%;
    box-shadow: 0 -33.6px 0 -5.6px #156e9c;
    position: absolute;
}

.spinner::after {
    animation-delay: 0s, 1.25s;
}

@keyframes spinner-b4c8mmmd {
    from {
        box-shadow: 0 0 0 -5.6px #156e9c;
    }
}

@keyframes spinner-49opz7md {
    to {
        transform: rotate(360deg);
    }
}

#emergentInputContainer {
    display: none;
    margin-top: 10px;
}

#emergentInputContainer input {
    padding: 10px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#emergentInputContainer button {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#emergentInputContainer button:hover {
    background: #0056b3;
}

.search_navbar_container{
    width: 130px; 
    margin-top:20px;
}

.special_pagination{
    margin: -10px 0px 20px 0px !important;
}

.font_blue{
    color: #156e9c !important;
}

.bold_text{
    font-weight: bold !important;
}

#searchModal mark {
    background: #fff3a0;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

#searchSubmitBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === Modal body scroll === */
#searchModal .modal-dialog.modal-xl {
    width: 95%;
    max-width: 1100px;
}

#searchModal .modal-body {
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

/* === Input group === */
.search-input-group .input-group-addon:first-child {
    background: #156e9c;
    color: #fff;
    border-color: #156e9c;
}

.search-clear-btn {
    background: #fff;
    border-left: 0;
    color: #999;
}

.search-clear-btn:hover {
    color: #d9534f;
}

/* === Resumen global === */
.search-summary {
    padding: 10px 12px;
    margin-bottom: 10px;
    background: #f9f9f9;
    border-radius: 4px;
    color: #555;
    font-size: 13px;
}

.search-summary strong {
    color: #156e9c;
}

/* === Indice de salto sticky === */
.search-jump-bar {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 5;
    padding: 8px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.search-jump-bar a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    margin-right: 5px;
    border-radius: 4px;
    background: #f0f0f0;
    color: #555;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.search-jump-bar a:hover {
    background: #156e9c;
    color: #fff;
    text-decoration: none;
}

.search-jump-bar a .badge {
    background: #156e9c;
    color: #fff;
    font-size: 11px;
}

.search-jump-bar a:hover .badge {
    background: #fff;
    color: #156e9c;
}

/* === Tarjetas de resultado === */
.search-result-item {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-left: 3px solid transparent;
    margin-bottom: 4px;
    border-radius: 4px;
    transition: background 0.15s, border-left-color 0.15s;
}

.search-result-item:hover {
    background: #f0f7fc;
    border-left-color: #156e9c;
    text-decoration: none;
}

.search-result-item .result-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.search-result-item .result-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

.search-result-item .result-label {
    flex-shrink: 0;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}

.search-result-item .result-meta {
    color: #999;
    font-size: 12px;
    margin-top: 5px;
}

.search-result-item .result-meta i {
    margin-right: 4px;
}

.search-result-item .result-preview {
    color: #666;
    font-size: 13px;
    margin-top: 4px;
    line-height: 1.4;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === Autor avatar === */
.author-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: #156e9c;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    margin-right: 12px;
}

.search-result-author {
    display: flex;
    align-items: flex-start;
}

/* === Multimedia === */
.multimedia-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: #f0ad4e;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 12px;
}

/* === Estado vacio === */
.search-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    color: #999;
    font-size: 13px;
}

.search-empty i {
    font-size: 16px;
    color: #ccc;
}

.search-empty .empty-text {
    margin: 0;
}

.search-empty .empty-sep {
    color: #ddd;
    margin: 0 2px;
}

.search-empty .empty-hint {
    color: #bbb;
}

/* === Paginacion === */
.search-pagination {
    font-size: 13px;
    margin-top: 10px;
    padding: 8px 0;
    text-align: center;
}

/* === Overlay de carga === */
.search-loading-overlay {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.search-loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    z-index: 10;
}

/* === Header de categoria === */
.search-category-header {
    padding: 8px 12px;
    margin: 0 0 10px 0;
    background-color: #f5f5f5;
    border-left: 4px solid #156e9c;
    border-radius: 0 4px 4px 0;
    color: #156e9c;
    font-weight: 600;
    font-size: 14px;
}

.search-category-header .badge {
    background-color: #156e9c;
    margin-left: 6px;
}

/* === Indicador de scroll === */
#searchScrollIndicator {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: linear-gradient(to top, #fff 70%, rgba(255,255,255,0.6));
    border-top: 1px solid #e8e8e8;
    color: #156e9c;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    z-index: 5;
    user-select: none;
    animation: fadeInUp 0.25s ease-out;
}

#searchScrollIndicator i {
    animation: bounceDown 1.5s ease-in-out infinite;
}

#searchScrollIndicator:hover {
    color: #0d4d72;
    background: linear-gradient(to top, #f0f7fc 70%, rgba(240,247,252,0.6));
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(3px); }
}