/* Estilos para el sistema de hash de búsquedas */

/* Botón de compartir búsqueda */
.search-share-button {
    margin-top: 10px;
    text-align: center;
    padding: 15px;
    border-top: 1px solid #eee;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.share-search-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background: #007bff;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

.share-search-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.4);
}

.share-search-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

.share-search-btn svg {
    flex-shrink: 0;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.share-search-btn:hover svg {
    opacity: 1;
}

/* Notificaciones de hash */
.search-hash-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-width: 300px;
    word-wrap: break-word;
}

.search-hash-notification--success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border: 1px solid rgba(255,255,255,0.2);
}

.search-hash-notification--error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: 1px solid rgba(255,255,255,0.2);
}

.search-hash-notification--info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: 1px solid rgba(255,255,255,0.2);
}

/* Indicador de búsqueda desde URL */
.search-from-url-indicator {
    position: absolute;
    top: -30px;
    left: 20px;
    right: 20px;
    text-align: center;
    font-size: 12px;
    color: #007bff;
    background: rgba(0,123,255,0.1);
    padding: 6px 12px;
    border-radius: 15px;
    border: 1px solid rgba(0,123,255,0.2);
    animation: hashIndicatorFadeIn 0.5s ease;
    backdrop-filter: blur(5px);
}

@keyframes hashIndicatorFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mejoras al overlay para búsquedas desde URL */
#dropdown-search-overlay.from-url-search {
    animation: hashSearchFromUrl 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes hashSearchFromUrl {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efecto de pulso en el input cuando se carga desde URL */
#dropdown-search-input.from-url-input {
    animation: hashInputPulse 1s ease-in-out;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

@keyframes hashInputPulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(0,123,255,0.2);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .search-share-button {
        padding: 10px;
    }
    
    .share-search-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .search-hash-notification {
        right: 10px;
        left: 10px;
        text-align: center;
        max-width: none;
        top: 70px;
    }
    
    .search-from-url-indicator {
        left: 10px;
        right: 10px;
        font-size: 11px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .share-search-btn span {
        display: none;
    }
    
    .share-search-btn {
        padding: 8px 12px;
    }
    
    .search-hash-notification {
        font-size: 13px;
        padding: 10px 16px;
    }
}

/* Estados de carga para URLs compartidas */
.hash-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.hash-loading-content {
    text-align: center;
    color: #007bff;
    font-weight: 600;
}

.hash-loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0,123,255,0.3);
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: hashSpinAnimation 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes hashSpinAnimation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animaciones de entrada refinadas */
.search-result-item.hash-result {
    animation: hashResultFadeIn 0.4s ease-out forwards;
    opacity: 0;
}

.search-result-item.hash-result:nth-child(1) { animation-delay: 0.1s; }
.search-result-item.hash-result:nth-child(2) { animation-delay: 0.15s; }
.search-result-item.hash-result:nth-child(3) { animation-delay: 0.2s; }
.search-result-item.hash-result:nth-child(4) { animation-delay: 0.25s; }
.search-result-item.hash-result:nth-child(5) { animation-delay: 0.3s; }

@keyframes hashResultFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}