/* Estilos para el sistema de búsqueda */

.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    justify-content: center;
    align-items: center;
}

.search-modal.active {
    display: flex;
}

.search-container {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.search-header {
    padding: 24px 28px;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.search-input-wrapper {
    position: relative;
}

.search-icon {
    display: none;
}

.search-input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #f3f4f6;
    border: none;
    font-size: 18px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: all 0.2s ease;
    z-index: 2;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-close:hover {
    color: #111827;
    background: #e5e7eb;
}

.search-results {
    padding: 16px 28px 24px;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    padding: 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.search-result-item:hover {
    background-color: #f3f4f6;
    border-color: #e5e7eb;
    transform: translateX(4px);
}

.search-result-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.search-result-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

.search-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.search-no-results-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.search-no-results-text {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.search-no-results-hint {
    font-size: 14px;
}

/* Scrollbar personalizado */
.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.search-modal.active {
    animation: fadeIn 0.2s ease;
}

.search-container {
    animation: slideUp 0.3s ease;
}

/* Responsive */
@media (max-width: 640px) {
    .search-container {
        width: 95%;
        max-height: 90vh;
    }

    .search-header {
        padding: 20px;
    }

    .search-results {
        padding: 12px 20px 20px;
    }

    .search-input {
        font-size: 14px;
        padding: 12px 46px 12px 16px;
    }

    .search-close {
        font-size: 16px;
        right: 10px;
        width: 28px;
        height: 28px;
    }

    .search-result-title {
        font-size: 15px;
    }

    .search-result-description {
        font-size: 13px;
    }
}
